stopTrackingPointer method

  1. @protected
void stopTrackingPointer (int pointer)
@protected

Stops events related to the given pointer ID from being routed to this recognizer.

If this function reduces the number of tracked pointers to zero, it will call didStopTrackingLastPointer synchronously.

Use startTrackingPointer to add the routes in the first place.

Implementation

@protected
void stopTrackingPointer(int pointer) {
  if (_trackedPointers.contains(pointer)) {
    GestureBinding.instance.pointerRouter.removeRoute(pointer, handleEvent);
    _trackedPointers.remove(pointer);
    if (_trackedPointers.isEmpty)
      didStopTrackingLastPointer(pointer);
  }
}