onTapDown method
Called when the user touches the device screen within the game canvas, either with a finger, a stylus, or a mouse.
The handler propagates the event to any component located at the point
of touch and that uses the TapCallbacks mixin. The event will be first
delivered to the topmost such component, and then propagated to the
components below only if explicitly requested.
Each event has an event.pointerId to keep track of multiple touches
that may occur simultaneously.
Implementation
@mustCallSuper
void onTapDown(TapDownEvent event) {
event.deliverAtPoint(
rootComponent: game,
eventHandler: (TapCallbacks component) {
_record.add(TaggedComponent(event.pointerId, component));
component.onTapDown(event);
},
);
}