li_zy
Committed by GitHub

Update README.md

@@ -17,20 +17,20 @@ csdn博客本工具介绍:https://blog.csdn.net/u011272795/article/details/82795 @@ -17,20 +17,20 @@ csdn博客本工具介绍:https://blog.csdn.net/u011272795/article/details/82795
17 17
18 使用方法: 18 使用方法:
19 19
20 -```  
21 导入包: 20 导入包:
22 - 21 +```
23 import 'package:flutter_app/ScreenUtil.dart'; //导入 22 import 'package:flutter_app/ScreenUtil.dart'; //导入
  23 +```
24 24
25 在使用之前请设置好设计稿的宽度和高度,如果不设置则使用默认尺寸 25 在使用之前请设置好设计稿的宽度和高度,如果不设置则使用默认尺寸
26 传入设计稿的宽度和高度(单位px),默认为1080*1920 26 传入设计稿的宽度和高度(单位px),默认为1080*1920
27 推荐在main.dart中设置,以保证在使用之前设置好了适配尺寸: 27 推荐在main.dart中设置,以保证在使用之前设置好了适配尺寸:
28 - 28 +```
29 ScreenUtil.instance = new ScreenUtil(width: 360, height: 720); 29 ScreenUtil.instance = new ScreenUtil(width: 360, height: 720);
30 - 30 +```
31 31
32 使用: 32 使用:
33 - 33 +```
34 .... 34 ....
35 //传入设计稿的px尺寸: 35 //传入设计稿的px尺寸:
36 36