handlePointerEvent method
- PointerEvent event
Dispatch an event to the targets found by a hit test on its position.
This method sends the given event to dispatchEvent based on event types:
- PointerDownEvents and PointerSignalEvents are dispatched to the result of a new hitTest.
- PointerUpEvents and PointerMoveEvents are dispatched to the result of hit test of the preceding PointerDownEvents.
- PointerHoverEvents, PointerAddedEvents, and PointerRemovedEvents are dispatched without a hit test result.
Implementation
void handlePointerEvent(PointerEvent event) {
assert(!locked);
if (resamplingEnabled) {
_resampler.addOrDispatch(event);
_resampler.sample(samplingOffset, samplingClock);
return;
}
// Stop resampler if resampling is not enabled. This is a no-op if
// resampling was never enabled.
_resampler.stop();
_handlePointerEventImmediately(event);
}