Skip to content

Commit 6e8818a

Browse files
author
李卓原
committed
merge 4.0.2+3
1 parent 6ae0fcf commit 6e8818a

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 5.0.0-nullsafety.3
2+
- merge 4.0.2+3
3+
14
# 5.0.0-nullsafety.2
25
- merge 4.0.2+2 #186
36

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
flutter:
2424
sdk: flutter
2525
# add flutter_screenutil
26-
flutter_screenutil: ^5.0.0-nullsafety.1
26+
flutter_screenutil: ^{latest version}
2727
```
2828
### Add the following imports to your Dart code:
2929
```dart

README_CN.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
# 添加依赖
31-
flutter_screenutil: ^5.0.0-nullsafety.1
31+
flutter_screenutil: ^{latest version}
3232
```
3333
### 在每个使用的地方导入包:
3434
```dart

README_PT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies:
2424
flutter:
2525
sdk: flutter
2626
# add flutter_screenutil
27-
flutter_screenutil: ^5.0.0-nullsafety.1
27+
flutter_screenutil: ^{latest version}
2828
```
2929
3030
### Adicione o seguinte import em seu código Dart:

lib/screenutil_init.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ class ScreenUtilInit extends StatelessWidget {
2222
@override
2323
Widget build(BuildContext context) {
2424
return LayoutBuilder(
25+
// ignore: missing_return
2526
builder: (_, BoxConstraints constraints) {
26-
ScreenUtil.init(
27-
constraints,
28-
designSize: designSize,
29-
allowFontScaling: allowFontScaling,
30-
);
27+
if (constraints.maxWidth != 0) {
28+
ScreenUtil.init(
29+
constraints,
30+
designSize: designSize,
31+
allowFontScaling: allowFontScaling,
32+
);
3133

3234
return child;
3335
},

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: 5.0.0-nullsafety.2
3+
version: 5.0.0-nullsafety.3
44
homepage: https://github.com/OpenFlutter/flutter_screenutil
55

66
environment:

0 commit comments

Comments
 (0)