mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Add comment explain dispatchEvent override (#60734)
This commit is contained in:
parent
80b5ee4e7c
commit
a5fa083906
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user