registerOnLongPress method

void registerOnLongPress(
  1. TouchCallback? touchCallback
)

Registers a callback for long-press gestures.

The gesture fires when a pointer remains down past the long-press threshold with minimal movement.

Parameters

  • touchCallback: (TouchCallback?) Invoked with the touch position. Pass null to unregister.

Implementation

void registerOnLongPress(final TouchCallback? touchCallback) {
  _touchLongPressCallback = touchCallback;

  GemKitPlatform.instance.filterEvent(
    pointerId,
    'mapViewOnLongDown',
    touchCallback == null,
  );
}