We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b4da27 commit 20ac1deCopy full SHA for 20ac1de
lib/screen_util.dart
@@ -45,15 +45,9 @@ class ScreenUtil {
45
_instance = ScreenUtil._()
46
..uiSize = designSize
47
..allowFontScaling = allowFontScaling
48
- .._orientation = orientation;
49
-
50
- if (orientation == Orientation.portrait) {
51
- _instance._screenWidth = constraints.maxWidth;
52
- _instance._screenHeight = constraints.maxHeight;
53
- } else {
54
- _instance._screenWidth = constraints.maxHeight;
55
- _instance._screenHeight = constraints.maxWidth;
56
- }
+ .._orientation = orientation
+ .._screenWidth = constraints.maxWidth
+ .._screenHeight = constraints.maxHeight;
57
58
var window = WidgetsBinding.instance?.window ?? ui.window;
59
_instance._pixelRatio = window.devicePixelRatio;
0 commit comments