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
LiZhuoyuan
2020-12-21 17:36:09 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-12-21 17:36:09 +0800
Commit
bcc55f38476ed4c56943ea35835a52fa38d711c7
bcc55f38
2 parents
5e89e8c0
ca1e2040
Merge pull request #183 from Tkko/patch-1
Changed window reference
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
lib/screenutil.dart
lib/screenutil.dart
View file @
bcc55f3
...
...
@@ -4,7 +4,6 @@
*/
import
'package:flutter/material.dart'
;
import
'dart:ui'
as
ui
;
class
ScreenUtil
{
static
const
Size
defaultSize
=
Size
(
1080
,
1920
);
...
...
@@ -43,7 +42,7 @@ class ScreenUtil {
_screenWidth
=
constraints
.
maxWidth
;
_screenHeight
=
constraints
.
maxHeight
;
var
mediaQuery
=
ui
.
window
;
var
mediaQuery
=
WidgetsBinding
.
instance
.
window
;
_pixelRatio
=
mediaQuery
.
devicePixelRatio
;
_statusBarHeight
=
mediaQuery
.
padding
.
top
;
_bottomBarHeight
=
mediaQuery
.
padding
.
bottom
;
...
...
Please
register
or
login
to post a comment