Remove deprecated call to .window
This commit is contained in:
parent
c50cecded3
commit
253c6b2075
@ -12,7 +12,7 @@ class PlatformInfo {
|
|||||||
static bool get isDesktopOrWeb => isDesktop || kIsWeb;
|
static bool get isDesktopOrWeb => isDesktop || kIsWeb;
|
||||||
static bool get isMobile => _mobilePlatforms.contains(defaultTargetPlatform) && !kIsWeb;
|
static bool get isMobile => _mobilePlatforms.contains(defaultTargetPlatform) && !kIsWeb;
|
||||||
|
|
||||||
static double get pixelRatio => WidgetsBinding.instance.window.devicePixelRatio;
|
static double get pixelRatio => WidgetsBinding.instance.platformDispatcher.views.first.devicePixelRatio;
|
||||||
|
|
||||||
static bool get isWindows => defaultTargetPlatform == TargetPlatform.windows;
|
static bool get isWindows => defaultTargetPlatform == TargetPlatform.windows;
|
||||||
static bool get isLinux => defaultTargetPlatform == TargetPlatform.linux;
|
static bool get isLinux => defaultTargetPlatform == TargetPlatform.linux;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user