Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
__卓原
flutter_screenutil
提交
04606de4
F
flutter_screenutil
项目概览
__卓原
/
flutter_screenutil
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flutter_screenutil
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
04606de4
编写于
10月 17, 2018
作者:
李
李卓原
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善文档
上级
09c151d5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
8 deletion
+16
-8
.packages
.packages
+1
-1
CHANGELOG.md
CHANGELOG.md
+5
-1
example/lib/main.dart
example/lib/main.dart
+6
-2
example/lib/main_zh.dart
example/lib/main_zh.dart
+2
-2
example/pubspec.lock
example/pubspec.lock
+1
-1
pubspec.yaml
pubspec.yaml
+1
-1
未找到文件。
.packages
浏览文件 @
04606de4
# 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
浏览文件 @
04606de4
...
...
@@ -4,4 +4,8 @@
## [0.2.2] - Optimize documentation
## [0.3.0] - Add font size adaptation
\ No newline at end of file
## [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
浏览文件 @
04606de4
...
...
@@ -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
浏览文件 @
04606de4
...
...
@@ -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
浏览文件 @
04606de4
...
...
@@ -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
浏览文件 @
04606de4
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录