Showing
1 changed file
with
8 additions
and
2 deletions
| @@ -39,8 +39,14 @@ ScreenUtil.instance = new ScreenUtil(width: 360, height: 720); | @@ -39,8 +39,14 @@ ScreenUtil.instance = new ScreenUtil(width: 360, height: 720); | ||
| 39 | 适配尺寸: | 39 | 适配尺寸: |
| 40 | ``` | 40 | ``` |
| 41 | //传入设计稿的px尺寸: | 41 | //传入设计稿的px尺寸: |
| 42 | -width: ScreenUtil().setWidth(540), | ||
| 43 | -height: ScreenUtil().setHeight(200), | 42 | +适配后的宽度width: ScreenUtil().setWidth(540), |
| 43 | +适配后的高度height: ScreenUtil().setHeight(200), | ||
| 44 | + | ||
| 45 | +例如: | ||
| 46 | +Container( | ||
| 47 | + width: ScreenUtil().setWidth(375), | ||
| 48 | + height: ScreenUtil().setHeight(200), | ||
| 49 | + ), | ||
| 44 | ``` | 50 | ``` |
| 45 | 51 | ||
| 46 | 其他相关api: | 52 | 其他相关api: |
-
Please register or login to post a comment