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
李卓原
2018-10-16 16:22:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7dce1d1c6d9de3672069fdfead83a6d49e857e02
7dce1d1c
1 parent
0b86faec
0.3.0文档
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
README.md
example/lib/main.dart
README.md
View file @
7dce1d1
...
...
@@ -90,7 +90,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
@override
Widget build(BuildContext context) {
//
设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6
750*1334)
//
/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.instance = ScreenUtil(width: 750, height: 1334)..init(context);
print('Device width:${ScreenUtil.screenWidth}'); //Device width
print('Device height:${ScreenUtil.screenHeight}'); //Device height
...
...
example/lib/main.dart
View file @
7dce1d1
...
...
@@ -29,7 +29,7 @@ class MyHomePage extends StatefulWidget {
class
_MyHomePageState
extends
State
<
MyHomePage
>
{
@override
Widget
build
(
BuildContext
context
)
{
//
设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6
750*1334)
//
/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
.
instance
=
ScreenUtil
(
width:
750
,
height:
1334
)..
init
(
context
);
print
(
'Device width:
${ScreenUtil.screenWidth}
'
);
//Device width
print
(
'Device height:
${ScreenUtil.screenHeight}
'
);
//Device height
...
...
Please
register
or
login
to post a comment