zhuoyuan

Revert "修正宽度和高度为无视屏幕的方向"

This reverts commit dc21e4a7.
@@ -31,7 +31,6 @@ class HomePageScaffold extends StatelessWidget { @@ -31,7 +31,6 @@ class HomePageScaffold extends StatelessWidget {
31 child: Column( 31 child: Column(
32 crossAxisAlignment: CrossAxisAlignment.start, 32 crossAxisAlignment: CrossAxisAlignment.start,
33 children: <Widget>[ 33 children: <Widget>[
34 - TextField(),  
35 Row( 34 Row(
36 children: <Widget>[ 35 children: <Widget>[
37 // Using Extensions 36 // Using Extensions
@@ -121,43 +121,13 @@ class ScreenUtil { @@ -121,43 +121,13 @@ class ScreenUtil {
121 121
122 /// 当前设备宽度 dp 122 /// 当前设备宽度 dp
123 /// The horizontal extent of this size. 123 /// The horizontal extent of this size.
124 - double get screenWidth {  
125 - if (_orientation == Orientation.landscape) {  
126 - return (context != null  
127 - ? MediaQuery.of(context!).size.height  
128 - : _screenHeight);  
129 - }  
130 - return context != null ? MediaQuery.of(context!).size.width : _screenWidth;  
131 - } 124 + double get screenWidth =>
  125 + context != null ? MediaQuery.of(context!).size.width : _screenWidth;
132 126
133 ///当前设备高度 dp 127 ///当前设备高度 dp
134 ///The vertical extent of this size. dp 128 ///The vertical extent of this size. dp
135 - double get screenHeight {  
136 - if (_orientation == Orientation.landscape) {  
137 - return context != null  
138 - ? MediaQuery.of(context!).size.width  
139 - : _screenWidth;  
140 - }  
141 - return context != null  
142 - ? MediaQuery.of(context!).size.height  
143 - : _screenHeight;  
144 - }  
145 -  
146 - Size get screenSize {  
147 - if (_orientation == Orientation.landscape) {  
148 - double width = (context != null  
149 - ? MediaQuery.of(context!).size.height  
150 - : _screenHeight) +  
151 - bottomBarHeight;  
152 - double height =  
153 - (context != null ? MediaQuery.of(context!).size.width : _screenWidth);  
154 -  
155 - return Size(width, height);  
156 - }  
157 - return Size(  
158 - context != null ? MediaQuery.of(context!).size.width : _screenWidth,  
159 - context != null ? MediaQuery.of(context!).size.height : _screenHeight);  
160 - } 129 + double get screenHeight =>
  130 + context != null ? MediaQuery.of(context!).size.height : _screenHeight;
161 131
162 /// 状态栏高度 dp 刘海屏会更高 132 /// 状态栏高度 dp 刘海屏会更高
163 /// The offset from the top, in dp 133 /// The offset from the top, in dp