Showing
1 changed file
with
3 additions
and
5 deletions
@@ -134,12 +134,10 @@ class _HomePageState extends State<HomePage> { | @@ -134,12 +134,10 @@ class _HomePageState extends State<HomePage> { | ||
134 | print('设备的像素密度:${ScreenUtil().pixelRatio}'); | 134 | print('设备的像素密度:${ScreenUtil().pixelRatio}'); |
135 | print('底部安全区距离:${ScreenUtil().bottomBarHeight}dp'); | 135 | print('底部安全区距离:${ScreenUtil().bottomBarHeight}dp'); |
136 | print('状态栏高度:${ScreenUtil().statusBarHeight}dp'); | 136 | print('状态栏高度:${ScreenUtil().statusBarHeight}dp'); |
137 | - print('实际宽度的dp与设计稿px的比例:${ScreenUtil().scaleWidth}'); | ||
138 | - print('实际高度的dp与设计稿px的比例:${ScreenUtil().scaleHeight}'); | 137 | + print('实际宽度和字体(dp)与设计稿(dp)的比例:${ScreenUtil().scaleWidth}'); |
138 | + print('实际高度(dp)与设计稿(dp)的比例:${ScreenUtil().scaleHeight}'); | ||
139 | print( | 139 | print( |
140 | - '宽度和字体相对于设计稿放大的比例:${ScreenUtil().scaleWidth * ScreenUtil().pixelRatio}'); | ||
141 | - print( | ||
142 | - '高度相对于设计稿放大的比例:${ScreenUtil().scaleHeight * ScreenUtil().pixelRatio}'); | 140 | + '高度相对于设计稿放大的比例:${ScreenUtil().scaleHeight}'); |
143 | print('系统的字体缩放比例:${ScreenUtil().textScaleFactor}'); | 141 | print('系统的字体缩放比例:${ScreenUtil().textScaleFactor}'); |
144 | print('屏幕宽度的0.5:${0.5.sw}dp'); | 142 | print('屏幕宽度的0.5:${0.5.sw}dp'); |
145 | print('屏幕高度的0.5:${0.5.sh}dp'); | 143 | print('屏幕高度的0.5:${0.5.sh}dp'); |
-
Please register or login to post a comment