File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ class ZKContext {
4444 }
4545
4646 double get deviceRatio {
47- return ui.window.devicePixelRatio;
47+ return WidgetsBinding
48+ .instance.platformDispatcher.views.first.devicePixelRatio;
4849 }
4950
5051 double get appWidthDP {
@@ -60,7 +61,11 @@ class ZKContext {
6061 }
6162
6263 bool isLandscape () {
63- Size s = ui.window.physicalSize / ui.window.devicePixelRatio;
64+ Size os =
65+ WidgetsBinding .instance.platformDispatcher.views.first.physicalSize;
66+ double ratio =
67+ WidgetsBinding .instance.platformDispatcher.views.first.devicePixelRatio;
68+ Size s = os / ratio;
6469 bool landscape = s.width > s.height;
6570 return landscape;
6671 }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
1111# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212# Read more about iOS versioning at
1313# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14- version : 2.3.1
14+ version : 2.3.2
1515homepage : https://github.com/flutterkit/zerker
1616
1717environment :
You can’t perform that action at this time.
0 commit comments