李卓原

完善文档

# Generated by pub on 2018-10-11 15:18:21.251012.
# Generated by pub on 2018-10-16 19:37:21.225361.
analyzer:file:///C:/Users/Frank/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/analyzer-0.32.4/lib/
args:file:///C:/Users/Frank/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/args-1.5.0/lib/
async:file:///C:/Users/Frank/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/async-2.0.8/lib/
... ...
... ... @@ -5,3 +5,7 @@
## [0.2.2] - Optimize documentation
## [0.3.0] - Add font size adaptation
## [0.3.0] - Perfect documentation
Width is enlarged relative to the design draft => The ratio of font and width to the size of the design
Height is enlarged relative to the design draft => The ratio of height width to the size of the design
... ...
... ... @@ -40,9 +40,9 @@ class _MyHomePageState extends State<MyHomePage> {
print(
'Status bar height:${ScreenUtil.statusBarHeight}px'); //Status bar height , Notch will be higher Unit px
print(
'Width is enlarged relative to the design draft:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft
'The ratio of font and width to the size of the design:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft
print(
'Height is enlarged relative to the design draft:${ScreenUtil().scaleHeight}'); //The height is enlarged relative to the design draft
'The ratio of height width to the size of the design:${ScreenUtil().scaleHeight}'); //The height is enlarged relative to the design draft
print('System font scaling factor:${ScreenUtil.textScaleFactory}');
return new Scaffold(
... ... @@ -105,6 +105,10 @@ class _MyHomePageState extends State<MyHomePage> {
Text('My font size is 28px and will change with the system.',
style: TextStyle(
color: Colors.black, fontSize: ScreenUtil().setSp(28))),
Text('My font size is default.',
style: TextStyle(
color: Colors.black,
)),
],
)
],
... ...
... ... @@ -39,9 +39,9 @@ class _MyHomePageState extends State<MyHomePage> {
print(
'状态栏高度:${ScreenUtil.statusBarHeight}px'); //Status bar height , Notch will be higher Unit px
print(
'宽度相对于设计稿放大的倍数:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft
'字体和宽度相对设计稿放大的比例:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft
print(
'高度相对于设计稿放大的倍数:${ScreenUtil().scaleHeight}'); //The height is enlarged relative to the design draft
'高度相对于设计稿放大的比例:${ScreenUtil().scaleHeight}'); //The height is enlarged relative to the design draft
print('系统的字体缩放比例:${ScreenUtil.textScaleFactory}');
return new Scaffold(
... ...
... ... @@ -82,7 +82,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.0"
version: "0.3.0"
flutter_test:
dependency: "direct dev"
description: flutter
... ...
name: flutter_screenutil
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version: 0.3.0
version: 0.3.1
author: LiZhuoyuan <zhuoyuan93@gmail.com>
homepage: https://github.com/OpenFlutter/flutter_ScreenUtil
... ...