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
李卓原
2021-04-20 13:50:37 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
90078d9ea9d385b833880f41f806541a859f1468
90078d9e
2 parents
16c059fe
5916118c
Merge remote-tracking branch 'origin/master'
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
README.md
README_CN.md
README_PT.md
example/README.md
README.md
View file @
90078d9
...
...
@@ -206,8 +206,7 @@ Container(
#### Adapter font:
```
dart
//Incoming font size(The unit is the same as the unit at initialization), fonts will not scale to respect Text Size accessibility settings
//(AllowallowFontScaling when initializing ScreenUtil)
//Incoming font size(The unit is the same as the unit at initialization)
ScreenUtil
().
setSp
(
28
)
28
.
sp
...
...
@@ -226,7 +225,7 @@ Column(
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
ScreenUtil
()
.
setSp
(
24
,
allowFontScalingSelf:
true
))),
.
setSp
(
24
))),
],
)
```
...
...
README_CN.md
View file @
90078d9
...
...
@@ -192,7 +192,7 @@ height:200.h
传入设计稿的字体大小:
```
dart
//传入字体大小(单位和初始化时的单位保持一致)
,默认不根据系统的“字体大小”辅助选项来进行缩放(可在初始化ScreenUtil时设置allowFontScaling)
//传入字体大小(单位和初始化时的单位保持一致)
ScreenUtil
().
setSp
(
28
)
或
28
.
sp
(
dart
sdk
>=
2.6
)
...
...
@@ -205,13 +205,12 @@ Column(
Text
(
'我的文字大小在设计稿上是24dp,不会随着系统的文字缩放比例变化'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
ScreenUtil
().
setSp
(
24
)
,
fontSize:
24
.
sp
,
)),
Text
(
'我的文字大小在设计稿上是24dp,会随着系统的文字缩放比例变化'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
ScreenUtil
()
.
setSp
(
24
,
allowFontScalingSelf:
true
))),
fontSize:
24
.
sp
)),
],
)
```
...
...
README_PT.md
View file @
90078d9
...
...
@@ -102,7 +102,6 @@ class _HomePageState extends State<HomePage> {
maxWidth: MediaQuery.of(context).size.width,
maxHeight: MediaQuery.of(context).size.height),
designSize: Size(360, 690),
allowFontScaling: false,
orientation: Orientation.portrait);
return Scaffold();
}
...
...
@@ -188,8 +187,8 @@ Container(
#### Adaptar fonte:
```
dart
//Tamanho da fonte informado, em pixels, a fonte não irá dimensionar respeitando a opção "Tamanho de Fonte" nas configurações de acessibilidade
//(allowFontScaling quando iniciar o ScreenUtil)
//Tamanho da fonte informado, em dp
ScreenUtil
().
setSp
(
28
)
//Tamanho da fonte informado,em pixels,a fonte irá dimensionar respeitando a opção "Tamanho de Fonte" nas configurações de acessibilidade
...
...
@@ -211,7 +210,7 @@ Column(
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
ScreenUtil
()
.
setSp
(
24
,
allowFontScalingSelf:
true
))),
.
setSp
(
24
))),
],
)
```
...
...
example/README.md
View file @
90078d9
...
...
@@ -126,7 +126,6 @@ class _ExampleWidgetState extends State<ExampleWidget> {
onPressed:
()
{
ScreenUtil
.
init
(
designSize:
Size
(
1500
,
1334
),
allowFontScaling:
false
,
);
setState
(()
{});
},
...
...
Please
register
or
login
to post a comment