Skip to content

Commit

Permalink
fix menu overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wgh136 committed Jan 6, 2025
1 parent 91ee48c commit 4b19ab5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/components/menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class _MenuRoute<T> extends PopupRoute<T> {
var width = entries.first.icon == null ? 216.0 : 242.0;
final size = MediaQuery.of(context).size;
var left = location.dx;
if (left < 10) {
left = 10;
}
if (left + width > size.width - 10) {
left = size.width - width - 10;
}
Expand Down

0 comments on commit 4b19ab5

Please sign in to comment.