addPointer method

  1. @override
void addPointer (PointerEvent event)

Registers a new pointer that might be relevant to this gesture detector.

The owner of this gesture recognizer calls addPointer() with the PointerDownEvent of each pointer that should be considered for this gesture.

It's the GestureRecognizer's responsibility to then add itself to the global pointer router (see PointerRouter) to receive subsequent events for this pointer, and to add the pointer to the global gesture arena manager (see GestureArenaManager) to track that pointer.


void addPointer(PointerEvent event) {
  // Ignore out-of-bounds second taps.
  if (_firstTap != null &&
      !_firstTap.isWithinTolerance(event, kDoubleTapSlop))
  final _TapTracker tracker = _TapTracker(
    event: event,
    entry: GestureBinding.instance.gestureArena.add(event.pointer, this)
  _trackers[event.pointer] = tracker;