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
李卓原
2022-01-12 18:27:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
717d4b2d96743abba9fc88b379af8e3bba48b7ff
717d4b2d
1 parent
c49a5fcb
fix #312
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
lib/screen_util.dart
lib/screen_util.dart
View file @
717d4b2
...
...
@@ -63,11 +63,13 @@ class ScreenUtil {
/// 当前设备宽度 dp
/// The horizontal extent of this size.
double
get
screenWidth
=>
_screenWidth
;
double
get
screenWidth
=>
context
==
null
?
_screenWidth
:
MediaQuery
.
of
(
context
!).
size
.
width
;
///当前设备高度 dp
///The vertical extent of this size. dp
double
get
screenHeight
=>
_screenHeight
;
double
get
screenHeight
=>
context
==
null
?
_screenHeight
:
MediaQuery
.
of
(
context
!).
size
.
height
;
/// 状态栏高度 dp 刘海屏会更高
/// The offset from the top, in dp
...
...
Please
register
or
login
to post a comment