李卓原

changelog

readme
... ... @@ -2,6 +2,10 @@
- Rollback of 5.1.1 commit
- Fix the problem of inaccurate height
- merge #332(https://github.com/OpenFlutter/flutter_screenutil/pull/332)
add
num.setVerticalSpacing // SizedBox(height: num * scaleHeight)
num.horizontalSpace // SizedBox(height: num * scaleWidth)
# 5.1.1
... ...
... ... @@ -200,6 +200,8 @@ class _HomePageState extends State<HomePage> {
ScreenUtil().orientation //Screen orientation
0.2.sw //0.2 times the screen width
0.5.sh //50% of screen height
20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight)
20.horizontalSpace // SizedBox(height: 20 * scaleWidth)
```
#### Adapt screen size:
... ...
... ... @@ -159,6 +159,9 @@ class _HomePageState extends State<HomePage> {
0.2.sw //屏幕宽度的0.2倍
0.5.sh //屏幕高度的50%
20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight)
20.horizontalSpace // SizedBox(height: 20 * scaleWidth)
```
... ...
... ... @@ -149,6 +149,8 @@ class _HomePageState extends State<HomePage> {
0.2.sw //0,2 vezes a largura da tela
0.5.sh //50% altura da tela
20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight)
20.horizontalSpace // SizedBox(height: 20 * scaleWidth)
```
#### Adaptar o tamanho da tela:
... ...