registerOnPinch method

void registerOnPinch(
  1. PinchCallback? pinchCallback
)

Registers a callback for continuous two-pointer pinch gestures.

A pinch is formed by two pointers moving while remaining in contact with the screen.

Parameters

  • pinchCallback: (PinchCallback?) Receives start/end positions and the computed center. Pass null to stop receiving pinches.

Implementation

void registerOnPinch(final PinchCallback? pinchCallback) {
  _pinchCallback = pinchCallback;

  GemKitPlatform.instance.filterEvent(
    pointerId,
    'onPinch',
    pinchCallback == null,
  );
}