fix menu overflow

This commit is contained in:
2025-01-06 22:10:01 +08:00
parent 91ee48cc6c
commit 4b19ab57d2

View File

@@ -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;
}