Skip to content

Commit

Permalink
fix #238
Browse files Browse the repository at this point in the history
  • Loading branch information
李卓原 committed Mar 29, 2021
1 parent 6b4da27 commit 20ac1de
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/screen_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20ac1de

Please sign in to comment.