李卓原

2.3

@@ -49,16 +49,13 @@ Be sure to set the page in the MaterialApp's home/initialRoute(ie the entry file @@ -49,16 +49,13 @@ Be sure to set the page in the MaterialApp's home/initialRoute(ie the entry file
49 //fill in the screen size of the device in the design 49 //fill in the screen size of the device in the design
50 50
51 //default value : width : 1080px , height:1920px , allowFontScaling:false 51 //default value : width : 1080px , height:1920px , allowFontScaling:false
52 -ScreenUtil.init(context); ~~//flutter_screenuitl < 1.2~~  
53 -~~ScreenUtil.init(); //flutter_screenuitl >= 1.2~~ 52 +ScreenUtil.init(context);
54 53
55 //If the design is based on the size of the iPhone6 ​​(iPhone6 ​​750*1334) 54 //If the design is based on the size of the iPhone6 ​​(iPhone6 ​​750*1334)
56 -ScreenUtil.init(context, width: 750, height: 1334); ~~//flutter_screenuitl < 1.2~~  
57 -~~ScreenUtil.init(width: 750, height: 1334); //flutter_screenuitl >= 1.2~~ 55 +ScreenUtil.init(context, width: 750, height: 1334);
58 56
59 //If you want to set the font size is scaled according to the system's "font size" assist option 57 //If you want to set the font size is scaled according to the system's "font size" assist option
60 -ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ~~//flutter_screenuitl < 1.2~~  
61 -~~ScreenUtil.init(width: 750, height: 1334, allowFontScaling: true); //flutter_screenuitl >= 1.2~~ 58 +ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
62 59
63 ``` 60 ```
64 61
@@ -53,16 +53,13 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -53,16 +53,13 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
53 //填入设计稿中设备的屏幕尺寸 53 //填入设计稿中设备的屏幕尺寸
54 54
55 //默认 width : 1080px , height:1920px , allowFontScaling:false 55 //默认 width : 1080px , height:1920px , allowFontScaling:false
56 -ScreenUtil.init(context); ~~//flutter_screenuitl < 1.2~~  
57 -~~ScreenUtil.init(); //flutter_screenuitl >= 1.2~~ 56 +ScreenUtil.init(context);
58 57
59 //假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) 58 //假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334)
60 -ScreenUtil.init(context, width: 750, height: 1334); ~~//flutter_screenuitl < 1.2~~  
61 -~~ScreenUtil.init(width: 750, height: 1334); //flutter_screenuitl >= 1.2~~ 59 +ScreenUtil.init(context, width: 750, height: 1334);
62 60
63 //设置字体大小根据系统的“字体大小”辅助选项来进行缩放,默认为false 61 //设置字体大小根据系统的“字体大小”辅助选项来进行缩放,默认为false
64 -ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ~~//flutter_screenuitl < 1.2~~  
65 -~~ScreenUtil.init(width: 750, height: 1334, allowFontScaling: true); //flutter_screenuitl >= 1.2~~ 62 +ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
66 63
67 ``` 64 ```
68 65
@@ -49,16 +49,13 @@ Certifique-se de definir as dimensões na paginal inicial do MaterialApp (ou sej @@ -49,16 +49,13 @@ Certifique-se de definir as dimensões na paginal inicial do MaterialApp (ou sej
49 //Preencha o tamanho da tela do dispositivo no protótipo de design 49 //Preencha o tamanho da tela do dispositivo no protótipo de design
50 50
51 //Valor padrão: width : 1080px , height:1920px , allowFontScaling:false 51 //Valor padrão: width : 1080px , height:1920px , allowFontScaling:false
52 -ScreenUtil.init(context); ~~//flutter_screenuitl < 1.2~~  
53 -~~ScreenUtil.init(); //flutter_screenuitl >= 1.2~~ 52 +ScreenUtil.init(context);
54 53
55 //Se o design é baseado no iPhone6 ​​(iPhone6 ​​750*1334) 54 //Se o design é baseado no iPhone6 ​​(iPhone6 ​​750*1334)
56 -ScreenUtil.init(context, width: 750, height: 1334); ~~//flutter_screenuitl < 1.2~~  
57 -~~ScreenUtil.init(width: 750, height: 1334); //flutter_screenuitl >= 1.2~~ 55 +ScreenUtil.init(context, width: 750, height: 1334);
58 56
59 //Se você quer definir que o tamanho da fonte seja ajustado de acordo com a opção "tamanho da fonte" na acessibilidade do sistema 57 //Se você quer definir que o tamanho da fonte seja ajustado de acordo com a opção "tamanho da fonte" na acessibilidade do sistema
60 -ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ~~//flutter_screenuitl < 1.2~~  
61 -~~ScreenUtil.init(width: 750, height: 1334, allowFontScaling: true); //flutter_screenuitl >= 1.2~~ 58 +ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
62 59
63 ``` 60 ```
64 61