@@ -11,7 +11,7 @@ void main() {
11
11
group ('DisplayFeatureSubScreen' , () {
12
12
testWidgets ('without Directionality or anchor' , (WidgetTester tester) async {
13
13
const Key childKey = Key ('childKey' );
14
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
14
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
15
15
displayFeatures: < DisplayFeature > [
16
16
const DisplayFeature (
17
17
bounds: Rect .fromLTRB (390 , 0 , 410 , 600 ),
@@ -39,7 +39,7 @@ void main() {
39
39
40
40
testWidgets ('with anchorPoint' , (WidgetTester tester) async {
41
41
const Key childKey = Key ('childKey' );
42
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
42
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
43
43
displayFeatures: < DisplayFeature > [
44
44
const DisplayFeature (
45
45
bounds: Rect .fromLTRB (390 , 0 , 410 , 600 ),
@@ -70,7 +70,7 @@ void main() {
70
70
71
71
testWidgets ('with infinity anchorpoint' , (WidgetTester tester) async {
72
72
const Key childKey = Key ('childKey' );
73
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
73
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
74
74
displayFeatures: < DisplayFeature > [
75
75
const DisplayFeature (
76
76
bounds: Rect .fromLTRB (390 , 0 , 410 , 600 ),
@@ -101,7 +101,7 @@ void main() {
101
101
102
102
testWidgets ('with horizontal hinge and anchorPoint' , (WidgetTester tester) async {
103
103
const Key childKey = Key ('childKey' );
104
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
104
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
105
105
displayFeatures: < DisplayFeature > [
106
106
const DisplayFeature (
107
107
bounds: Rect .fromLTRB (0 , 290 , 800 , 310 ),
@@ -131,7 +131,7 @@ void main() {
131
131
132
132
testWidgets ('with multiple display features and anchorPoint' , (WidgetTester tester) async {
133
133
const Key childKey = Key ('childKey' );
134
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
134
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
135
135
displayFeatures: < DisplayFeature > [
136
136
const DisplayFeature (
137
137
bounds: Rect .fromLTRB (0 , 290 , 800 , 310 ),
@@ -166,7 +166,7 @@ void main() {
166
166
167
167
testWidgets ('with non-splitting display features and anchorPoint' , (WidgetTester tester) async {
168
168
const Key childKey = Key ('childKey' );
169
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
169
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
170
170
displayFeatures: < DisplayFeature > [
171
171
// Top notch
172
172
const DisplayFeature (
@@ -211,7 +211,7 @@ void main() {
211
211
212
212
testWidgets ('with size 0 display feature in half-opened posture and anchorPoint' , (WidgetTester tester) async {
213
213
const Key childKey = Key ('childKey' );
214
- final MediaQueryData mediaQuery = MediaQueryData .fromWindow (WidgetsBinding .instance.window).copyWith (
214
+ final MediaQueryData mediaQuery = MediaQueryData .fromView (WidgetsBinding .instance.window).copyWith (
215
215
displayFeatures: < DisplayFeature > [
216
216
const DisplayFeature (
217
217
bounds: Rect .fromLTRB (0 , 300 , 800 , 300 ),
0 commit comments