Showing
4 changed files
with
10 additions
and
7 deletions
1 | +# 5.2.0 | ||
2 | + | ||
3 | +- Rollback of 5.1.1 commit | ||
4 | + | ||
1 | # 5.1.1 | 5 | # 5.1.1 |
6 | + | ||
2 | - .w,.h use MediaQuery | 7 | - .w,.h use MediaQuery |
3 | 8 | ||
4 | # 5.1.0 | 9 | # 5.1.0 |
10 | + | ||
5 | - Break Change: updated the first initialization method, please refer to README.md | 11 | - Break Change: updated the first initialization method, please refer to README.md |
6 | 12 | ||
7 | # 5.0.4 | 13 | # 5.0.4 |
14 | + | ||
8 | - Break Change : add setContext() , the first initialization method requires calling | 15 | - Break Change : add setContext() , the first initialization method requires calling |
9 | - fix # 310 | 16 | - fix # 310 |
10 | - update ReadMe.md | 17 | - update ReadMe.md |
@@ -63,13 +63,11 @@ class ScreenUtil { | @@ -63,13 +63,11 @@ class ScreenUtil { | ||
63 | 63 | ||
64 | /// 当前设备宽度 dp | 64 | /// 当前设备宽度 dp |
65 | /// The horizontal extent of this size. | 65 | /// The horizontal extent of this size. |
66 | - double get screenWidth => | ||
67 | - context == null ? _screenWidth : MediaQuery.of(context!).size.width; | 66 | + double get screenWidth => _screenWidth; |
68 | 67 | ||
69 | ///当前设备高度 dp | 68 | ///当前设备高度 dp |
70 | ///The vertical extent of this size. dp | 69 | ///The vertical extent of this size. dp |
71 | - double get screenHeight => | ||
72 | - context == null ? _screenHeight : MediaQuery.of(context!).size.height; | 70 | + double get screenHeight => _screenHeight; |
73 | 71 | ||
74 | /// 状态栏高度 dp 刘海屏会更高 | 72 | /// 状态栏高度 dp 刘海屏会更高 |
75 | /// The offset from the top, in dp | 73 | /// The offset from the top, in dp |
1 | name: flutter_screenutil | 1 | name: flutter_screenutil |
2 | description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models | 2 | description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models |
3 | -version: 5.1.1 | 3 | +version: 5.2.0 |
4 | homepage: https://github.com/OpenFlutter/flutter_screenutil | 4 | homepage: https://github.com/OpenFlutter/flutter_screenutil |
5 | publish_to: https://pub.dev | 5 | publish_to: https://pub.dev |
6 | 6 |
-
Please register or login to post a comment