File tree 2 files changed +5
-9
lines changed 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,8 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
494
494
///
495
495
/// When [handlePointerEvent] is called directly, [pointerEventSource]
496
496
/// is [TestBindingEventSource.device] .
497
- TestBindingEventSource pointerEventSource = TestBindingEventSource .device;
497
+ TestBindingEventSource get pointerEventSource => _pointerEventSource;
498
+ TestBindingEventSource _pointerEventSource = TestBindingEventSource .device;
498
499
499
500
/// Dispatch an event to the targets found by a hit test on its position,
500
501
/// and remember its source as [pointerEventSource] .
@@ -529,12 +530,12 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
529
530
/// to the previous value.
530
531
@protected
531
532
void withPointerEventSource (TestBindingEventSource source, VoidCallback task) {
532
- final TestBindingEventSource previousSource = pointerEventSource ;
533
- pointerEventSource = source;
533
+ final TestBindingEventSource previousSource = _pointerEventSource ;
534
+ _pointerEventSource = source;
534
535
try {
535
536
task ();
536
537
} finally {
537
- pointerEventSource = previousSource;
538
+ _pointerEventSource = previousSource;
538
539
}
539
540
}
540
541
Original file line number Diff line number Diff line change @@ -31,11 +31,6 @@ void main() {
31
31
binding.defaultTestTimeout = const test_package.Timeout (Duration (minutes: 5 ));
32
32
expect (binding.defaultTestTimeout.duration, const Duration (minutes: 5 ));
33
33
});
34
-
35
- test ('allows setting pointerEventSource to TestBindingEventSource.test' , () {
36
- binding.pointerEventSource = TestBindingEventSource .test;
37
- expect (binding.pointerEventSource, TestBindingEventSource .test);
38
- });
39
34
});
40
35
41
36
// The next three tests must run in order -- first using `test`, then `testWidgets`, then `test` again.
You can’t perform that action at this time.
0 commit comments