Aniket Khote

'SingletonFlutterWindow' is deprecated and shouldn't be used

@@ -1171,14 +1171,14 @@ extension GetNavigationExt on GetInterface { @@ -1171,14 +1171,14 @@ extension GetNavigationExt on GetInterface {
1171 } 1171 }
1172 1172
1173 /// The window to which this binding is bound. 1173 /// The window to which this binding is bound.
1174 - ui.SingletonFlutterWindow get window => engine.window; 1174 + ui.PlatformDispatcher get window => engine.platformDispatcher;
1175 1175
1176 - Locale? get deviceLocale => engine.window.locale; 1176 + Locale? get deviceLocale => window.locale;
1177 1177
1178 ///The number of device pixels for each logical pixel. 1178 ///The number of device pixels for each logical pixel.
1179 - double get pixelRatio => engine.window.devicePixelRatio; 1179 + double get pixelRatio => window.implicitView!.devicePixelRatio;
1180 1180
1181 - Size get size => engine.window.physicalSize / pixelRatio; 1181 + Size get size => window.implicitView!.physicalSize / pixelRatio;
1182 1182
1183 ///The horizontal extent of this size. 1183 ///The horizontal extent of this size.
1184 double get width => size.width; 1184 double get width => size.width;
@@ -1188,14 +1188,14 @@ extension GetNavigationExt on GetInterface { @@ -1188,14 +1188,14 @@ extension GetNavigationExt on GetInterface {
1188 1188
1189 ///The distance from the top edge to the first unpadded pixel, 1189 ///The distance from the top edge to the first unpadded pixel,
1190 ///in physical pixels. 1190 ///in physical pixels.
1191 - double get statusBarHeight => engine.window.padding.top; 1191 + double get statusBarHeight => window.implicitView!.padding.top;
1192 1192
1193 ///The distance from the bottom edge to the first unpadded pixel, 1193 ///The distance from the bottom edge to the first unpadded pixel,
1194 ///in physical pixels. 1194 ///in physical pixels.
1195 - double get bottomBarHeight => engine.window.padding.bottom; 1195 + double get bottomBarHeight => window.implicitView!.padding.bottom;
1196 1196
1197 ///The system-reported text scale. 1197 ///The system-reported text scale.
1198 - double get textScaleFactor => engine.window.textScaleFactor; 1198 + double get textScaleFactor => window.textScaleFactor;
1199 1199
1200 /// give access to TextTheme.of(context) 1200 /// give access to TextTheme.of(context)
1201 TextTheme get textTheme => theme.textTheme; 1201 TextTheme get textTheme => theme.textTheme;