scale method

PointerScaleEvent scale(
  1. double scale, {
  2. Duration timeStamp = Duration.zero,
  3. FlutterView? view,
})

Create a PointerScaleEvent (e.g., legacy pinch-to-zoom).

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

Implementation

PointerScaleEvent scale(double scale, {Duration timeStamp = Duration.zero, FlutterView? view}) {
  assert(kind != PointerDeviceKind.touch, "Touch pointers can't generate pointer signal events");
  assert(location != null);
  return PointerScaleEvent(
    viewId: view?.viewId ?? WidgetsBinding.instance.platformDispatcher.implicitView!.viewId,
    timeStamp: timeStamp,
    kind: kind,
    device: _device,
    position: location!,
    scale: scale,
  );
}