panZoomStart method Null safety

PointerPanZoomStartEvent panZoomStart(
  1. Offset location,
  2. {Duration timeStamp = Duration.zero}
)

Create a PointerPanZoomStartEvent (e.g., trackpad scroll; not scroll wheel or finger-drag scroll) with the given delta.

By default, the time stamp on the event is Duration.zero. You can give a specific time stamp by passing the timeStamp argument.

Implementation

PointerPanZoomStartEvent panZoomStart(
  Offset location, {
  Duration timeStamp = Duration.zero
}) {
  assert(!isPanZoomActive);
  assert(kind == PointerDeviceKind.trackpad);
  _location = location;
  _pan = Offset.zero;
  _isPanZoomActive = true;
  return PointerPanZoomStartEvent(
    timeStamp: timeStamp,
    device: _device,
    pointer: pointer,
    position: location,
  );
}