Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_screenutil
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李卓原
2018-10-17 15:12:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
04606de444259b50ba553047f64cb1883216e3fa
04606de4
1 parent
09c151d5
完善文档
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
7 deletions
.packages
CHANGELOG.md
example/lib/main.dart
example/lib/main_zh.dart
example/pubspec.lock
pubspec.yaml
.packages
View file @
04606de
# Generated by pub on 2018-10-1
1 15:18:21.251012
.
# Generated by pub on 2018-10-1
6 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/
...
...
CHANGELOG.md
View file @
04606de
...
...
@@ -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
...
...
example/lib/main.dart
View file @
04606de
...
...
@@ -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
,
)),
],
)
],
...
...
example/lib/main_zh.dart
View file @
04606de
...
...
@@ -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
(
...
...
example/pubspec.lock
View file @
04606de
...
...
@@ -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
...
...
pubspec.yaml
View file @
04606de
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
...
...
Please
register
or
login
to post a comment