addPointer method
- @override
override
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.
Implementation
@override
void addPointer(PointerEvent event) {
assert(!_gestureMap.containsKey(event.pointer));
_gestureMap[event.pointer] = _TapGesture(
gestureRecognizer: this,
event: event,
longTapDelay: longTapDelay
);
if (onTapDown != null)
invokeCallback<void>('onTapDown', () => onTapDown(event.pointer, TapDownDetails(globalPosition: event.position)));
}