- override
Dispatch an event to a hit test result's path.
This sends the given event to every HitTestTarget
in the entries
of the given HitTestResult
, and catches exceptions that any of
the handlers might throw. The result
argument must not be null.
Source
@override void dispatchEvent(PointerEvent event, HitTestResult result, { TestBindingEventSource source: TestBindingEventSource.device }) { switch (source) { case TestBindingEventSource.test: if (!renderView._pointers.containsKey(event.pointer)) { assert(event.down); renderView._pointers[event.pointer] = new _LiveTestPointerRecord(event.pointer, event.position); } else { renderView._pointers[event.pointer].position = event.position; if (!event.down) renderView._pointers[event.pointer].decay = _kPointerDecay; } renderView.markNeedsPaint(); super.dispatchEvent(event, result, source: source); break; case TestBindingEventSource.device: if (deviceEventDispatcher != null) deviceEventDispatcher.dispatchEvent(event, result); break; } }