Committed by
GitHub
Merge pull request #2902 from Aniketkhote/master
'useInheritedMediaQuery' is deprecated and shouldn't be used
Showing
4 changed files
with
9 additions
and
11 deletions
| @@ -1242,14 +1242,14 @@ extension GetNavigationExt on GetInterface { | @@ -1242,14 +1242,14 @@ extension GetNavigationExt on GetInterface { | ||
| 1242 | } | 1242 | } |
| 1243 | 1243 | ||
| 1244 | /// The window to which this binding is bound. | 1244 | /// The window to which this binding is bound. |
| 1245 | - ui.SingletonFlutterWindow get window => engine.window; | 1245 | + ui.PlatformDispatcher get window => engine.platformDispatcher; |
| 1246 | 1246 | ||
| 1247 | - Locale? get deviceLocale => engine.window.locale; | 1247 | + Locale? get deviceLocale => window.locale; |
| 1248 | 1248 | ||
| 1249 | ///The number of device pixels for each logical pixel. | 1249 | ///The number of device pixels for each logical pixel. |
| 1250 | - double get pixelRatio => engine.window.devicePixelRatio; | 1250 | + double get pixelRatio => window.implicitView!.devicePixelRatio; |
| 1251 | 1251 | ||
| 1252 | - Size get size => engine.window.physicalSize / pixelRatio; | 1252 | + Size get size => window.implicitView!.physicalSize / pixelRatio; |
| 1253 | 1253 | ||
| 1254 | ///The horizontal extent of this size. | 1254 | ///The horizontal extent of this size. |
| 1255 | double get width => size.width; | 1255 | double get width => size.width; |
| @@ -1259,14 +1259,14 @@ extension GetNavigationExt on GetInterface { | @@ -1259,14 +1259,14 @@ extension GetNavigationExt on GetInterface { | ||
| 1259 | 1259 | ||
| 1260 | ///The distance from the top edge to the first unpadded pixel, | 1260 | ///The distance from the top edge to the first unpadded pixel, |
| 1261 | ///in physical pixels. | 1261 | ///in physical pixels. |
| 1262 | - double get statusBarHeight => engine.window.padding.top; | 1262 | + double get statusBarHeight => window.implicitView!.padding.top; |
| 1263 | 1263 | ||
| 1264 | ///The distance from the bottom edge to the first unpadded pixel, | 1264 | ///The distance from the bottom edge to the first unpadded pixel, |
| 1265 | ///in physical pixels. | 1265 | ///in physical pixels. |
| 1266 | - double get bottomBarHeight => engine.window.padding.bottom; | 1266 | + double get bottomBarHeight => window.implicitView!.padding.bottom; |
| 1267 | 1267 | ||
| 1268 | ///The system-reported text scale. | 1268 | ///The system-reported text scale. |
| 1269 | - double get textScaleFactor => engine.window.textScaleFactor; | 1269 | + double get textScaleFactor => window.textScaleFactor; |
| 1270 | 1270 | ||
| 1271 | /// give access to TextTheme.of(context) | 1271 | /// give access to TextTheme.of(context) |
| 1272 | TextTheme get textTheme => theme.textTheme; | 1272 | TextTheme get textTheme => theme.textTheme; |
| @@ -252,7 +252,6 @@ class GetCupertinoApp extends StatelessWidget { | @@ -252,7 +252,6 @@ class GetCupertinoApp extends StatelessWidget { | ||
| 252 | debugShowCheckedModeBanner: debugShowCheckedModeBanner, | 252 | debugShowCheckedModeBanner: debugShowCheckedModeBanner, |
| 253 | shortcuts: shortcuts, | 253 | shortcuts: shortcuts, |
| 254 | scrollBehavior: scrollBehavior, | 254 | scrollBehavior: scrollBehavior, |
| 255 | - useInheritedMediaQuery: useInheritedMediaQuery, | ||
| 256 | ); | 255 | ); |
| 257 | }), | 256 | }), |
| 258 | ); | 257 | ); |
| @@ -281,7 +281,6 @@ class GetMaterialApp extends StatelessWidget { | @@ -281,7 +281,6 @@ class GetMaterialApp extends StatelessWidget { | ||
| 281 | debugShowCheckedModeBanner: debugShowCheckedModeBanner, | 281 | debugShowCheckedModeBanner: debugShowCheckedModeBanner, |
| 282 | shortcuts: shortcuts, | 282 | shortcuts: shortcuts, |
| 283 | scrollBehavior: scrollBehavior, | 283 | scrollBehavior: scrollBehavior, |
| 284 | - useInheritedMediaQuery: useInheritedMediaQuery, | ||
| 285 | ); | 284 | ); |
| 286 | }), | 285 | }), |
| 287 | ); | 286 | ); |
-
Please register or login to post a comment