OffsetPoint.from constructor

OffsetPoint.from(
  1. Offset offset, {
  2. double? pressure,
})

Creates an OffsetPoint from a standard Offset with the current timestamp and optional pressure.

Implementation

factory OffsetPoint.from(Offset offset, {double? pressure}) => OffsetPoint(
      dx: offset.dx,
      dy: offset.dy,
      timestamp: DateTime.now().millisecondsSinceEpoch,
      pressure: pressure,
    );