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-29 17:05:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20ac1de0f2f2b95d43922d1567fa2aa1629c8cee
20ac1de0
1 parent
6b4da27d
fix #238
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
lib/screen_util.dart
lib/screen_util.dart
View file @
20ac1de
...
...
@@ -45,15 +45,9 @@ class ScreenUtil {
_instance
=
ScreenUtil
.
_
()
..
uiSize
=
designSize
..
allowFontScaling
=
allowFontScaling
..
_orientation
=
orientation
;
if
(
orientation
==
Orientation
.
portrait
)
{
_instance
.
_screenWidth
=
constraints
.
maxWidth
;
_instance
.
_screenHeight
=
constraints
.
maxHeight
;
}
else
{
_instance
.
_screenWidth
=
constraints
.
maxHeight
;
_instance
.
_screenHeight
=
constraints
.
maxWidth
;
}
..
_orientation
=
orientation
..
_screenWidth
=
constraints
.
maxWidth
..
_screenHeight
=
constraints
.
maxHeight
;
var
window
=
WidgetsBinding
.
instance
?.
window
??
ui
.
window
;
_instance
.
_pixelRatio
=
window
.
devicePixelRatio
;
...
...
Please
register
or
login
to post a comment