李卓原

update readme 5.0+2

... ... @@ -217,17 +217,20 @@ Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'My font size is 24dp on the design draft and will not change with the system.',
'16sp, will not change with the system.',
style: TextStyle(
color: Colors.black,
fontSize: ScreenUtil().setSp(24),
)),
fontSize: 16.sp,
),
textScaleFactor: 1.0,
),
Text(
'My font size is 24dp on the design draft and will change with the system.',
'16sp,if data is not set in MediaQuery,my font size will change with the system.',
style: TextStyle(
color: Colors.black,
fontSize: ScreenUtil()
.setSp(24))),
fontSize: 16.sp,
),
),
],
)
```
... ...
... ... @@ -204,15 +204,21 @@ ScreenUtil().setSp(28)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('我的文字大小在设计稿上是24dp,不会随着系统的文字缩放比例变化',
Text(
'我的文字大小在设计稿上是16dp,因为设置了`textScaleFactor`,所以不会随着系统的文字缩放比例变化',
style: TextStyle(
color: Colors.black,
fontSize: 24.sp,
)),
Text('我的文字大小在设计稿上是24dp,会随着系统的文字缩放比例变化',
fontSize: 16.sp,
),
textScaleFactor: 1.0,
),
Text(
'我的文字大小在设计稿上是16dp,会随着系统的文字缩放比例变化',
style: TextStyle(
color: Colors.black,
fontSize: 24.sp)),
fontSize: 16.sp,
),
),
],
)
```
... ...
... ... @@ -205,7 +205,8 @@ Column(
style: TextStyle(
color: Colors.black,
fontSize: ScreenUtil().setSp(24),
)),
),
textScaleFactor: 1.0,),
Text(
'Minha fonte tem 24px no protótipo de design e poderá mudar com o sistema.',
style: TextStyle(
... ...