onLongPress method
Implementation
bool onLongPress(Point<double> localPosition) {
// Walk through listeners stopping at the first handled listener.
final claimingListener = _activeListeners.firstWhereOrNull(
(GestureListener listener) =>
listener.onLongPress?.call(localPosition) ?? false);
// If someone claims the long press, then cancel everyone else.
if (claimingListener != null) {
_activeListeners =
_cancel(all: _activeListeners, keep: [claimingListener]);
return true;
}
return false;
}