Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_screenutil
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李卓原
2021-04-22 15:04:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f4c797e03c8be2fb133ecffe997b95782cf98278
f4c797e0
1 parent
90078d9e
修正描述错误
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
example/lib/main_zh.dart
example/lib/main_zh.dart
View file @
f4c797e
...
...
@@ -134,12 +134,10 @@ class _HomePageState extends State<HomePage> {
print
(
'设备的像素密度:
${ScreenUtil().pixelRatio}
'
);
print
(
'底部安全区距离:
${ScreenUtil().bottomBarHeight}
dp'
);
print
(
'状态栏高度:
${ScreenUtil().statusBarHeight}
dp'
);
print
(
'实际宽度的dp与设计稿px的比例:
${ScreenUtil().scaleWidth}
'
);
print
(
'实际高度的dp与设计稿px的比例:
${ScreenUtil().scaleHeight}
'
);
print
(
'实际宽度和字体(dp)与设计稿(dp)的比例:
${ScreenUtil().scaleWidth}
'
);
print
(
'实际高度(dp)与设计稿(dp)的比例:
${ScreenUtil().scaleHeight}
'
);
print
(
'宽度和字体相对于设计稿放大的比例:
${ScreenUtil().scaleWidth * ScreenUtil().pixelRatio}
'
);
print
(
'高度相对于设计稿放大的比例:
${ScreenUtil().scaleHeight * ScreenUtil().pixelRatio}
'
);
'高度相对于设计稿放大的比例:
${ScreenUtil().scaleHeight}
'
);
print
(
'系统的字体缩放比例:
${ScreenUtil().textScaleFactor}
'
);
print
(
'屏幕宽度的0.5:
${0.5.sw}
dp'
);
print
(
'屏幕高度的0.5:
${0.5.sh}
dp'
);
...
...
Please
register
or
login
to post a comment