startTrackingPointer method

  1. @protected
void startTrackingPointer (int pointer, [ Matrix4 transform ])
@protected

Causes events related to the given pointer ID to be routed to this recognizer.

The pointer events are transformed according to transform and then delivered to handleEvent. The value for the transform argument is usually obtained from PointerDownEvent.transform to transform the events from the global coordinate space into the coordinate space of the event receiver. It may be null if no transformation is necessary.

Use stopTrackingPointer to remove the route added by this function.

Implementation

@protected
void startTrackingPointer(int pointer, [Matrix4 transform]) {
  GestureBinding.instance.pointerRouter.addRoute(pointer, handleEvent, transform);
  _trackedPointers.add(pointer);
  assert(!_entries.containsValue(pointer));
  _entries[pointer] = _addPointerToArena(pointer);
}