Skip to content

Commit 824b0b6

Browse files
authored
fix: Use logical pixels for popover offset calculation (#84)
* Fix popover positioning by using logical pixels for size calculation * Make `physicalSize` calculation dynamic
1 parent 5a672f2 commit 824b0b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/utils/popover_utils.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ abstract class PopoverUtils {
3333
}
3434
}
3535

36-
static final physicalSize =
37-
PlatformDispatcher.instance.views.first.physicalSize;
36+
static Size get physicalSize =>
37+
PlatformDispatcher.instance.views.first.physicalSize /
38+
PlatformDispatcher.instance.views.first.devicePixelRatio;
3839
}
3940

4041
typedef PopoverTransitionBuilder = Widget Function(

0 commit comments

Comments
 (0)