李卓原

文档优化

@@ -90,14 +90,14 @@ Container( @@ -90,14 +90,14 @@ Container(
90 #### Adapter font: 90 #### Adapter font:
91 ``` 91 ```
92 ScreenUtil().setSp(28) //Incoming font size,the unit is pixel, fonts will not scale to respect Text Size accessibility settings 92 ScreenUtil().setSp(28) //Incoming font size,the unit is pixel, fonts will not scale to respect Text Size accessibility settings
93 - ScreenUtil().setSp(28,true) //Incoming font size,the unit is pixel,fonts will scale to respect Text Size accessibility settings 93 + ScreenUtil(allowFontScaling: true).setSp(28) //Incoming font size,the unit is pixel,fonts will scale to respect Text Size accessibility settings
94 94
95 for example: 95 for example:
96 Text( 96 Text(
97 'My font size is 28px and will not change with the system.', 97 'My font size is 28px and will not change with the system.',
98 style: TextStyle( 98 style: TextStyle(
99 color: Colors.black, 99 color: Colors.black,
100 - fontSize: ScreenUtil().setSp(28, false) 100 + fontSize:ScreenUtil(allowFontScaling: true).setSp(28, false)
101 ) 101 )
102 ), 102 ),
103 103
@@ -213,7 +213,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -213,7 +213,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
213 'My font size is 14px on the design draft and will change with the system.', 213 'My font size is 14px on the design draft and will change with the system.',
214 style: TextStyle( 214 style: TextStyle(
215 color: Colors.black, 215 color: Colors.black,
216 - fontSize: ScreenUtil().setSp(14,true), 216 + fontSize: ScreenUtil(allowFontScaling: true).setSp(24),
217 )), 217 )),
218 ], 218 ],
219 ) 219 )
@@ -102,7 +102,7 @@ for example: @@ -102,7 +102,7 @@ for example:
102 'My font size is 28px and will not change with the system.', 102 'My font size is 28px and will not change with the system.',
103 style: TextStyle( 103 style: TextStyle(
104 color: Colors.black, 104 color: Colors.black,
105 - fontSize: ScreenUtil().setSp(28, false) 105 + fontSize: ScreenUtil(allowFontScaling: true).setSp(28, false)
106 ) 106 )
107 ), 107 ),
108 108