Showing
4 changed files
with
11 additions
and
0 deletions
| @@ -2,6 +2,10 @@ | @@ -2,6 +2,10 @@ | ||
| 2 | 2 | ||
| 3 | - Rollback of 5.1.1 commit | 3 | - Rollback of 5.1.1 commit |
| 4 | - Fix the problem of inaccurate height | 4 | - Fix the problem of inaccurate height |
| 5 | +- merge #332(https://github.com/OpenFlutter/flutter_screenutil/pull/332) | ||
| 6 | + add | ||
| 7 | + num.setVerticalSpacing // SizedBox(height: num * scaleHeight) | ||
| 8 | + num.horizontalSpace // SizedBox(height: num * scaleWidth) | ||
| 5 | 9 | ||
| 6 | # 5.1.1 | 10 | # 5.1.1 |
| 7 | 11 |
| @@ -200,6 +200,8 @@ class _HomePageState extends State<HomePage> { | @@ -200,6 +200,8 @@ class _HomePageState extends State<HomePage> { | ||
| 200 | ScreenUtil().orientation //Screen orientation | 200 | ScreenUtil().orientation //Screen orientation |
| 201 | 0.2.sw //0.2 times the screen width | 201 | 0.2.sw //0.2 times the screen width |
| 202 | 0.5.sh //50% of screen height | 202 | 0.5.sh //50% of screen height |
| 203 | + 20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight) | ||
| 204 | + 20.horizontalSpace // SizedBox(height: 20 * scaleWidth) | ||
| 203 | ``` | 205 | ``` |
| 204 | 206 | ||
| 205 | #### Adapt screen size: | 207 | #### Adapt screen size: |
| @@ -159,6 +159,9 @@ class _HomePageState extends State<HomePage> { | @@ -159,6 +159,9 @@ class _HomePageState extends State<HomePage> { | ||
| 159 | 159 | ||
| 160 | 0.2.sw //屏幕宽度的0.2倍 | 160 | 0.2.sw //屏幕宽度的0.2倍 |
| 161 | 0.5.sh //屏幕高度的50% | 161 | 0.5.sh //屏幕高度的50% |
| 162 | + 20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight) | ||
| 163 | + 20.horizontalSpace // SizedBox(height: 20 * scaleWidth) | ||
| 164 | + | ||
| 162 | ``` | 165 | ``` |
| 163 | 166 | ||
| 164 | 167 |
| @@ -149,6 +149,8 @@ class _HomePageState extends State<HomePage> { | @@ -149,6 +149,8 @@ class _HomePageState extends State<HomePage> { | ||
| 149 | 149 | ||
| 150 | 0.2.sw //0,2 vezes a largura da tela | 150 | 0.2.sw //0,2 vezes a largura da tela |
| 151 | 0.5.sh //50% altura da tela | 151 | 0.5.sh //50% altura da tela |
| 152 | + 20.setVerticalSpacing // SizedBox(height: 20 * scaleHeight) | ||
| 153 | + 20.horizontalSpace // SizedBox(height: 20 * scaleWidth) | ||
| 152 | ``` | 154 | ``` |
| 153 | 155 | ||
| 154 | #### Adaptar o tamanho da tela: | 156 | #### Adaptar o tamanho da tela: |
-
Please register or login to post a comment