dispatchEvent method
- PointerEvent event,
- HitTestResult? hitTestResult
override
Dispatch an event to pointerRouter and the path of a hit test result.
The event
is routed to pointerRouter. If the hitTestResult
is not
null, the event is also sent to every HitTestTarget in the entries of the
given HitTestResult. Any exceptions from the handlers are caught.
The hitTestResult
argument may only be null for PointerAddedEvents or
PointerRemovedEvents.
Implementation
@override // from GestureBinding
void dispatchEvent(PointerEvent event, HitTestResult? hitTestResult) {
_mouseTracker!.updateWithEvent(
event,
// When the button is pressed, normal hit test uses a cached
// result, but MouseTracker requires that the hit test is re-executed to
// update the hovering events.
event is PointerMoveEvent ? null : hitTestResult,
);
super.dispatchEvent(event, hitTestResult);
}