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-03-11 11:38:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df0c80c420a22925f43371132e656a18ca89c5a1
df0c80c4
1 parent
60bdec3d
去掉第一次初始化失败时的断言错误
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
lib/screen_util.dart
lib/screenutil_init.dart
lib/screen_util.dart
View file @
df0c80c
...
...
@@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
class
ScreenUtil
{
static
const
Size
defaultSize
=
Size
(
360
,
690
);
static
ScreenUtil
_instance
=
ScreenUtil
.
_
()
;
static
late
ScreenUtil
_instance
;
/// UI设计中手机尺寸 , dp
/// Size of the phone in UI Design , dp
...
...
@@ -42,7 +42,7 @@ class ScreenUtil {
Size
designSize
=
defaultSize
,
bool
allowFontScaling
=
false
,
})
{
_instance
_instance
=
ScreenUtil
.
_
()
..
uiSize
=
designSize
..
allowFontScaling
=
allowFontScaling
..
_orientation
=
orientation
;
...
...
lib/screenutil_init.dart
View file @
df0c80c
...
...
@@ -31,8 +31,9 @@ class ScreenUtilInit extends StatelessWidget {
designSize:
designSize
,
allowFontScaling:
allowFontScaling
,
);
return
builder
();
}
return
build
er
();
return
Contain
er
();
},
);
});
...
...
Please
register
or
login
to post a comment