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
李卓原
2020-07-17 16:48:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fb1dcfbb5e17ab5a476708bca67d363c94817a56
fb1dcfbb
1 parent
e80d6190
2.3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
example/lib/main.dart
example/lib/main.dart
View file @
fb1dcfb
...
...
@@ -19,17 +19,11 @@ class MyApp extends StatelessWidget {
}
}
class
MyHomePage
extends
StatefulWidget
{
@override
_MyHomePageState
createState
()
=>
_MyHomePageState
();
}
class
_MyHomePageState
extends
State
<
MyHomePage
>
{
class
MyHomePage
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
//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)
ScreenUtil
.
init
(
context
,
width:
750
,
height:
1334
,
allowFontScaling:
false
);
return
ExampleWidget
(
title:
'FlutterScreenUtil Demo'
);
}
}
...
...
@@ -46,7 +40,7 @@ class ExampleWidget extends StatefulWidget {
class
_ExampleWidgetState
extends
State
<
ExampleWidget
>
{
@override
Widget
build
(
BuildContext
context
)
{
//
printScreenInformation();
printScreenInformation
();
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
widget
.
title
),
...
...
Please
register
or
login
to post a comment