Showing
1 changed file
with
2 additions
and
0 deletions
| @@ -149,6 +149,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -149,6 +149,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 149 | Widget build(BuildContext context) { | 149 | Widget build(BuildContext context) { |
| 150 | ///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) | 150 | ///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) |
| 151 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | 151 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); |
| 152 | + | ||
| 152 | print('Device width:${ScreenUtil.screenWidth}'); //Device width | 153 | print('Device width:${ScreenUtil.screenWidth}'); //Device width |
| 153 | print('Device height:${ScreenUtil.screenHeight}'); //Device height | 154 | print('Device height:${ScreenUtil.screenHeight}'); //Device height |
| 154 | print( | 155 | print( |
| @@ -165,6 +166,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -165,6 +166,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 165 | 'The ratio of font and width to the size of the design:${ScreenUtil.getInstance().scaleWidth * ScreenUtil.pixelRatio}'); | 166 | 'The ratio of font and width to the size of the design:${ScreenUtil.getInstance().scaleWidth * ScreenUtil.pixelRatio}'); |
| 166 | print( | 167 | print( |
| 167 | 'The ratio of height width to the size of the design:${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}'); | 168 | 'The ratio of height width to the size of the design:${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}'); |
| 169 | + | ||
| 168 | return new Scaffold( | 170 | return new Scaffold( |
| 169 | appBar: new AppBar( | 171 | appBar: new AppBar( |
| 170 | title: new Text(widget.title), | 172 | title: new Text(widget.title), |
-
Please register or login to post a comment