李卓原

0.3.0文档

@@ -90,7 +90,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -90,7 +90,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
90 90
91 @override 91 @override
92 Widget build(BuildContext context) { 92 Widget build(BuildContext context) {
93 - //设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) 93 + ///Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the iPhone6 ​​(iPhone6 ​​750*1334)
94 ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); 94 ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);
95 print('Device width:${ScreenUtil.screenWidth}'); //Device width 95 print('Device width:${ScreenUtil.screenWidth}'); //Device width
96 print('Device height:${ScreenUtil.screenHeight}'); //Device height 96 print('Device height:${ScreenUtil.screenHeight}'); //Device height
@@ -29,7 +29,7 @@ class MyHomePage extends StatefulWidget { @@ -29,7 +29,7 @@ class MyHomePage extends StatefulWidget {
29 class _MyHomePageState extends State<MyHomePage> { 29 class _MyHomePageState extends State<MyHomePage> {
30 @override 30 @override
31 Widget build(BuildContext context) { 31 Widget build(BuildContext context) {
32 - //设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) 32 + ///Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the iPhone6 ​​(iPhone6 ​​750*1334)
33 ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); 33 ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);
34 print('Device width:${ScreenUtil.screenWidth}'); //Device width 34 print('Device width:${ScreenUtil.screenWidth}'); //Device width
35 print('Device height:${ScreenUtil.screenHeight}'); //Device height 35 print('Device height:${ScreenUtil.screenHeight}'); //Device height