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
李卓原
2023-05-12 14:07:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ddf554ed9e54f8a72b6486f90f70aa9a53d22b50
ddf554ed
1 parent
43300ed2
迁移3.10
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
lib/src/screen_util.dart
lib/src/screenutil_init.dart
lib/src/screen_util.dart
View file @
ddf554e
...
...
@@ -59,9 +59,9 @@ class ScreenUtil {
Duration
duration
=
const
Duration
(
milliseconds:
10
),
])
async
{
final
binding
=
WidgetsFlutterBinding
.
ensureInitialized
();
window
??=
binding
.
windo
w
;
window
??=
WidgetsBinding
.
instance
.
platformDispatcher
.
implicitVie
w
;
if
(
window
.
physicalGeometry
.
isEmpty
)
{
if
(
window
?.
physicalGeometry
.
isEmpty
==
true
)
{
return
Future
.
delayed
(
duration
,
()
async
{
binding
.
deferFirstFrame
();
await
ensureScreenSize
(
window
,
duration
);
...
...
lib/src/screenutil_init.dart
View file @
ddf554e
...
...
@@ -78,7 +78,7 @@ class _ScreenUtilInitState extends State<ScreenUtilInit>
}
}
return
MediaQueryData
.
from
Window
(
binding
.
window
);
return
MediaQueryData
.
from
View
(
View
.
of
(
context
)
);
}
Widget
get
child
{
...
...
Please
register
or
login
to post a comment