Skip to content

Commit 20ac1de

Browse files
author
李卓原
committed
fix #238
1 parent 6b4da27 commit 20ac1de

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/screen_util.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,9 @@ class ScreenUtil {
4545
_instance = ScreenUtil._()
4646
..uiSize = designSize
4747
..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-
}
48+
.._orientation = orientation
49+
.._screenWidth = constraints.maxWidth
50+
.._screenHeight = constraints.maxHeight;
5751

5852
var window = WidgetsBinding.instance?.window ?? ui.window;
5953
_instance._pixelRatio = window.devicePixelRatio;

0 commit comments

Comments
 (0)