李卓原

fix #238

@@ -45,15 +45,9 @@ class ScreenUtil { @@ -45,15 +45,9 @@ class ScreenUtil {
45 _instance = ScreenUtil._() 45 _instance = ScreenUtil._()
46 ..uiSize = designSize 46 ..uiSize = designSize
47 ..allowFontScaling = allowFontScaling 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 - } 48 + .._orientation = orientation
  49 + .._screenWidth = constraints.maxWidth
  50 + .._screenHeight = constraints.maxHeight;
57 51
58 var window = WidgetsBinding.instance?.window ?? ui.window; 52 var window = WidgetsBinding.instance?.window ?? ui.window;
59 _instance._pixelRatio = window.devicePixelRatio; 53 _instance._pixelRatio = window.devicePixelRatio;