Unverified Commit a5fa0839 authored by Ming Lyu (CareF)'s avatar Ming Lyu (CareF) Committed by GitHub

Add comment explain dispatchEvent override (#60734)

parent 80b5ee4e
......@@ -467,6 +467,11 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
HitTestResult hitTestResult, {
TestBindingEventSource source = TestBindingEventSource.device,
}) {
// This override disables calling this method from base class
// [GestureBinding] when the runtime type is [TestWidgetsFlutterBinding],
// while enables sub class [LiveTestWidgetsFlutterBinding] to override
// this behavior and use this argument to determine the souce of the event
// especially when the test app is running on a device.
assert(source == TestBindingEventSource.test);
super.dispatchEvent(event, hitTestResult);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment