Skip to content

Commit

Permalink
Merge pull request #2902 from Aniketkhote/master
Browse files Browse the repository at this point in the history
'useInheritedMediaQuery' is deprecated and shouldn't be used
  • Loading branch information
jonataslaw authored Sep 11, 2023
2 parents acf1f61 + c4ea27a commit f41fc87
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions example_nav2/android/local.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sdk.dir=/Users/jonatasborges/Library/Android/sdk
flutter.sdk=/Users/jonatasborges/flutter
sdk.dir=C:\\Users\\anike\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\flutter
14 changes: 7 additions & 7 deletions lib/get_navigation/src/extension_navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1242,14 +1242,14 @@ extension GetNavigationExt on GetInterface {
}

/// The window to which this binding is bound.
ui.SingletonFlutterWindow get window => engine.window;
ui.PlatformDispatcher get window => engine.platformDispatcher;

Locale? get deviceLocale => engine.window.locale;
Locale? get deviceLocale => window.locale;

///The number of device pixels for each logical pixel.
double get pixelRatio => engine.window.devicePixelRatio;
double get pixelRatio => window.implicitView!.devicePixelRatio;

Size get size => engine.window.physicalSize / pixelRatio;
Size get size => window.implicitView!.physicalSize / pixelRatio;

///The horizontal extent of this size.
double get width => size.width;
Expand All @@ -1259,14 +1259,14 @@ extension GetNavigationExt on GetInterface {

///The distance from the top edge to the first unpadded pixel,
///in physical pixels.
double get statusBarHeight => engine.window.padding.top;
double get statusBarHeight => window.implicitView!.padding.top;

///The distance from the bottom edge to the first unpadded pixel,
///in physical pixels.
double get bottomBarHeight => engine.window.padding.bottom;
double get bottomBarHeight => window.implicitView!.padding.bottom;

///The system-reported text scale.
double get textScaleFactor => engine.window.textScaleFactor;
double get textScaleFactor => window.textScaleFactor;

/// give access to TextTheme.of(context)
TextTheme get textTheme => theme.textTheme;
Expand Down
1 change: 0 additions & 1 deletion lib/get_navigation/src/root/get_cupertino_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ class GetCupertinoApp extends StatelessWidget {
debugShowCheckedModeBanner: debugShowCheckedModeBanner,
shortcuts: shortcuts,
scrollBehavior: scrollBehavior,
useInheritedMediaQuery: useInheritedMediaQuery,
);
}),
);
Expand Down
1 change: 0 additions & 1 deletion lib/get_navigation/src/root/get_material_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ class GetMaterialApp extends StatelessWidget {
debugShowCheckedModeBanner: debugShowCheckedModeBanner,
shortcuts: shortcuts,
scrollBehavior: scrollBehavior,
useInheritedMediaQuery: useInheritedMediaQuery,
);
}),
);
Expand Down

0 comments on commit f41fc87

Please sign in to comment.