onTap method

bool onTap(
  1. Point<double> localPosition
)

Implementation

bool onTap(Point<double> localPosition) {
  // Walk through listeners stopping at the first handled listener.
  final claimingListener = _activeListeners.firstWhereOrNull(
    (listener) => listener.onTap?.call(localPosition) ?? false,
  );

  // If someone claims the tap, then cancel everyone else.
  // This should hopefully be rare, like for drilling.
  if (claimingListener != null) {
    _activeListeners =
        _cancel(all: _activeListeners, keep: [claimingListener]);
    return true;
  }
  return false;
}