@@ -9,8 +9,9 @@ import 'package:flutter_test/flutter_test.dart';
9
9
void main () {
10
10
testWidgets ('can localize the header in all known formats - portrait' , (WidgetTester tester) async {
11
11
// Ensure picker is displayed in portrait mode.
12
- tester.binding.window.physicalSizeTestValue = const Size (400 , 800 );
13
- tester.binding.window.devicePixelRatioTestValue = 1 ;
12
+ tester.view.physicalSize = const Size (400 , 800 );
13
+ tester.view.devicePixelRatio = 1 ;
14
+ addTearDown (tester.view.reset);
14
15
15
16
final Finder stringFragmentTextFinder = find.descendant (
16
17
of: find.byWidgetPredicate ((Widget w) => '${w .runtimeType }' == '_StringFragment' ),
@@ -74,15 +75,13 @@ void main() {
74
75
await tester.tapAt (Offset (center.dx, center.dy - 50.0 ));
75
76
await finishPicker (tester);
76
77
}
77
-
78
- tester.binding.window.clearPhysicalSizeTestValue ();
79
- tester.binding.window.clearDevicePixelRatioTestValue ();
80
78
});
81
79
82
80
testWidgets ('can localize the header in all known formats - landscape' , (WidgetTester tester) async {
83
81
// Ensure picker is displayed in landscape mode.
84
- tester.binding.window.physicalSizeTestValue = const Size (800 , 400 );
85
- tester.binding.window.devicePixelRatioTestValue = 1 ;
82
+ tester.view.physicalSize = const Size (800 , 400 );
83
+ tester.view.devicePixelRatio = 1 ;
84
+ addTearDown (tester.view.reset);
86
85
87
86
final Finder stringFragmentTextFinder = find.descendant (
88
87
of: find.byWidgetPredicate ((Widget w) => '${w .runtimeType }' == '_StringFragment' ),
@@ -151,9 +150,6 @@ void main() {
151
150
await tester.tapAt (Offset (center.dx, center.dy - 50.0 ));
152
151
await finishPicker (tester);
153
152
}
154
-
155
- tester.binding.window.clearPhysicalSizeTestValue ();
156
- tester.binding.window.clearDevicePixelRatioTestValue ();
157
153
});
158
154
159
155
testWidgets ('can localize input mode in all known formats' , (WidgetTester tester) async {
0 commit comments