mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-08-06 09:39:31 +08:00
Remove deprecated call to .window
This commit is contained in:
@ -12,7 +12,7 @@ class PlatformInfo {
|
||||
static bool get isDesktopOrWeb => isDesktop || 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 isLinux => defaultTargetPlatform == TargetPlatform.linux;
|
||||
|
Reference in New Issue
Block a user