Skip to content

Commit

Permalink
fix: Use logical pixels for popover offset calculation (#84)
Browse files Browse the repository at this point in the history
* Fix popover positioning by using logical pixels for size calculation

* Make `physicalSize` calculation dynamic
  • Loading branch information
zwett authored Feb 7, 2024
1 parent 5a672f2 commit 824b0b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/utils/popover_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ abstract class PopoverUtils {
}
}

static final physicalSize =
PlatformDispatcher.instance.views.first.physicalSize;
static Size get physicalSize =>
PlatformDispatcher.instance.views.first.physicalSize /
PlatformDispatcher.instance.views.first.devicePixelRatio;
}

typedef PopoverTransitionBuilder = Widget Function(
Expand Down

0 comments on commit 824b0b6

Please sign in to comment.