Skip to content

Commit c7829b2

Browse files
author
李卓原
committed
5.0.0-nullsafety.2
1 parent 66262a0 commit c7829b2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 5.0.0-nullsafety.1
1+
# 5.0.0-nullsafety.2
22
- merge 4.0.2+2 #186
33

44
# 5.0.0-nullsafety.1

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _HomePageState extends State<HomePage> {
6565
// Without using Extensions
6666
Container(
6767
padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
68-
width: 180.w,
68+
width: ScreenUtil().setWidth(180),
6969
height: ScreenUtil().setHeight(200),
7070
color: Colors.blue,
7171
child: Text(

example/lib/main_zh.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class _HomePageState extends State<HomePage> {
4747
children: <Widget>[
4848
Container(
4949
padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
50-
width: ScreenUtil().setWidth(375),
51-
height: ScreenUtil().setHeight(200),
50+
width: 180.w,
51+
height: 200.h,
5252
color: Colors.red,
5353
child: Text(
5454
'我的实际宽度:${0.5.sw}dp \n'
@@ -58,23 +58,23 @@ class _HomePageState extends State<HomePage> {
5858
),
5959
Container(
6060
padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
61-
width: 180.w,
62-
height: 200.h,
61+
width: ScreenUtil().setWidth(180),
62+
height: ScreenUtil().setHeight(200),
6363
color: Colors.blue,
6464
child: Text(
6565
'我的设计稿宽度: 180dp \n'
6666
'我的设计稿高度: 200dp',
6767
style: TextStyle(color: Colors.white, fontSize: ScreenUtil().setSp(12))),
6868
),
69-
7069
],
7170
),
7271
Container(
7372
padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
7473
width: 100.r,
7574
height: 100.r,
7675
color: Colors.green,
77-
child: Text('我是正方形,边长是100',
76+
child: Text(
77+
'我是正方形,边长是100',
7878
style: TextStyle(
7979
color: Colors.white,
8080
fontSize: ScreenUtil().setSp(12),

0 commit comments

Comments
 (0)