Skip to content

Commit 16d4d6d

Browse files
committed
3.0.2
1 parent 27415cc commit 16d4d6d

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @LastEditTime: 2020年6月20日 11:20:02
66
* @Description: Update log
77
-->
8+
# 3.0.2
9+
- Change the unit of'statusBarHeight' and 'bottomBarHeight' to dp
810

911
# 3.0.1
1012
- update readme

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
flutter:
2929
sdk: flutter
3030
# add flutter_screenutil
31-
flutter_screenutil: ^3.0.1
31+
flutter_screenutil: ^3.0.2
3232
```
3333
### Add the following imports to your Dart code:
3434
```

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies:
3333
flutter:
3434
sdk: flutter
3535
# 添加依赖
36-
flutter_screenutil: ^3.0.1
36+
flutter_screenutil: ^3.0.2
3737
```
3838
### 在每个使用的地方导入包:
3939
```

README_PT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
flutter:
2929
sdk: flutter
3030
# add flutter_screenutil
31-
flutter_screenutil: ^3.0.1
31+
flutter_screenutil: ^3.0.2
3232
```
3333

3434
### Adicione o seguinte import em seu código Dart:

lib/screenutil.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class ScreenUtil {
3434
_pixelRatio = window.devicePixelRatio;
3535
_screenWidth = window.physicalSize.width / _pixelRatio;
3636
_screenHeight = window.physicalSize.height / _pixelRatio;
37-
_statusBarHeight = window.padding.top;
38-
_bottomBarHeight = window.padding.bottom;
37+
_statusBarHeight = window.padding.top / _pixelRatio;
38+
_bottomBarHeight = window.padding.bottom / _pixelRatio;
3939
_textScaleFactor = window.textScaleFactor;
4040
}
4141

@@ -83,11 +83,11 @@ class ScreenUtil {
8383

8484
/// 状态栏高度 dp 刘海屏会更高
8585
/// The offset from the top
86-
double get statusBarHeight => _statusBarHeight / _pixelRatio;
86+
double get statusBarHeight => _statusBarHeight;
8787

8888
/// 底部安全区距离 dp
8989
/// The offset from the bottom.
90-
double get bottomBarHeight => _bottomBarHeight / _pixelRatio;
90+
double get bottomBarHeight => _bottomBarHeight;
9191

9292
/// 实际的dp与UI设计px的比例
9393
/// The ratio of the actual dp to the design draft px

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_screenutil
22
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
3-
version: 3.0.1
3+
version: 3.0.2
44
homepage: https://github.com/OpenFlutter/flutter_screenutil/tree/beta
55

66
environment:

0 commit comments

Comments
 (0)