diff --git a/lib/screen_util.dart b/lib/screen_util.dart index 6e50ce6..9a89771 100644 --- a/lib/screen_util.dart +++ b/lib/screen_util.dart @@ -45,15 +45,9 @@ class ScreenUtil { _instance = ScreenUtil._() ..uiSize = designSize ..allowFontScaling = allowFontScaling - .._orientation = orientation; - - if (orientation == Orientation.portrait) { - _instance._screenWidth = constraints.maxWidth; - _instance._screenHeight = constraints.maxHeight; - } else { - _instance._screenWidth = constraints.maxHeight; - _instance._screenHeight = constraints.maxWidth; - } + .._orientation = orientation + .._screenWidth = constraints.maxWidth + .._screenHeight = constraints.maxHeight; var window = WidgetsBinding.instance?.window ?? ui.window; _instance._pixelRatio = window.devicePixelRatio;