registerOnTwoTouches method

void registerOnTwoTouches(
  1. TouchCallback? twoTouchCallback
)

Registers a callback for simultaneous two-pointer touch gestures.

Two-touch events occur when two pointers land and lift within the gesture thresholds.

Parameters

  • twoTouchCallback: (TouchCallback?) Receives the midpoint between the two touch points. Pass null to stop listening.

Implementation

void registerOnTwoTouches(final TouchCallback? twoTouchCallback) {
  _touchTwoCallback = twoTouchCallback;

  GemKitPlatform.instance.filterEvent(
    pointerId,
    'onTwoTouches',
    twoTouchCallback == null,
  );
}