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
lizhuoyuan
2020-03-17 15:26:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
606ddd2f199774e0fb840a63823a10da279f0802
606ddd2f
1 parent
0fb6206c
no message
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
README.md
README_CN.md
README_PT.md
README.md
View file @
606ddd2
...
...
@@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
### Use:
###
#
API
### API
```
dart
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//Adapted to screen width
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//Adapted to screen width
ScreenUtil
().
setHeight
(
200
)
(
sdk
>=
2.6
:
200
.
h
)
//Adapted to screen height
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//Adapter font
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//Adapter font
ScreenUtil
().
setSp
(
24
,
allowFontScalingSelf:
true
)
(
sdk
>=
2.6
:
24
.
ssp
)
//Adapter font(fonts will scale to respect Text Size accessibility settings)
ScreenUtil
.
pixelRatio
//Device pixel density
...
...
README_CN.md
View file @
606ddd2
...
...
@@ -64,12 +64,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
### 使用
###
#
API
### API
```
dart
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//根据屏幕宽度适配尺寸
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//根据屏幕宽度适配尺寸
ScreenUtil
().
setHeight
(
200
)
(
sdk
>=
2.6
:
200
.
h
)
//根据屏幕高度适配尺寸
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//适配字体
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//适配字体
ScreenUtil
().
setSp
(
24
,
allowFontScalingSelf:
true
)
(
sdk
>=
2.6
:
24
.
ssp
)
//适配字体(根据系统的“字体大小”辅助选项来进行缩放)
ScreenUtil
.
pixelRatio
//设备的像素密度
...
...
README_PT.md
View file @
606ddd2
...
...
@@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
### Uso:
###
#
API
### API
```
dart
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//Adapted to screen width
ScreenUtil
().
setWidth
(
540
)
(
sdk
>=
2.6
:
540
.
w
)
//Adapted to screen width
ScreenUtil
().
setHeight
(
200
)
(
sdk
>=
2.6
:
200
.
h
)
//Adapted to screen height
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//Adapter font
ScreenUtil
().
setSp
(
24
)
(
sdk
>=
2.6
:
24
.
sp
)
//Adapter font
ScreenUtil
().
setSp
(
24
,
allowFontScalingSelf:
true
)
(
sdk
>=
2.6
:
24
.
ssp
)
//Adapter font(fonts will scale to respect Text Size accessibility settings)
ScreenUtil
.
pixelRatio
//Device pixel density
...
...
Please
register
or
login
to post a comment