Skip to content

Commit 9451d5e

Browse files
committed
readme
1 parent bfe7835 commit 9451d5e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Please use v2, v3 now has some bugs.
2+
13
# flutter_screenutil
24
[![pub package](https://img.shields.io/pub/v/flutter_screenutil.svg)](https://pub.dev/packages/flutter_screenutil)
35

README_CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 请使用v2,v3现在有一些bug
2+
13
# flutter_ScreenUtil
24

35
[![pub package](https://img.shields.io/pub/v/flutter_screenutil.svg)](https://pub.dartlang.org/packages/flutter_screenutil)

example/lib/main.dart

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ExampleWidget extends StatefulWidget {
3838
class _ExampleWidgetState extends State<ExampleWidget> {
3939
@override
4040
Widget build(BuildContext context) {
41-
// printScreenInformation();
41+
printScreenInformation();
4242
return Scaffold(
4343
appBar: AppBar(
4444
title: Text(widget.title),
@@ -135,16 +135,13 @@ class _ExampleWidgetState extends State<ExampleWidget> {
135135
void printScreenInformation() {
136136
print('Device width dp:${ScreenUtil().screenWidth}'); //Device width
137137
print('Device height dp:${ScreenUtil().screenHeight}'); //Device height
138-
print(
139-
'Device pixel density:${ScreenUtil().pixelRatio}'); //Device pixel density
138+
print('Device pixel density:${ScreenUtil().pixelRatio}'); //Device pixel density
140139
print(
141140
'Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}'); //Bottom safe zone distance,suitable for buttons with full screen
142141
print(
143142
'Status bar height px:${ScreenUtil().statusBarHeight}dp'); //Status bar height , Notch will be higher Unit px
144-
print(
145-
'Ratio of actual width dp to design draft px:${ScreenUtil().scaleWidth}');
146-
print(
147-
'Ratio of actual height dp to design draft px:${ScreenUtil().scaleHeight}');
143+
print('Ratio of actual width dp to design draft px:${ScreenUtil().scaleWidth}');
144+
print('Ratio of actual height dp to design draft px:${ScreenUtil().scaleHeight}');
148145
print(
149146
'The ratio of font and width to the size of the design:${ScreenUtil().scaleWidth * ScreenUtil().pixelRatio}');
150147
print(
@@ -154,3 +151,4 @@ class _ExampleWidgetState extends State<ExampleWidget> {
154151
print('0.5 times the screen height:${0.5.hp}');
155152
}
156153
}
154+

0 commit comments

Comments
 (0)