From e7045b18fb6b7547eaf03dd038583928358ca21c Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sun, 19 Jul 2026 12:50:01 +0800 Subject: [PATCH] constrain mobile sidebar sheet height --- lib/pages/workspace_page.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/pages/workspace_page.dart b/lib/pages/workspace_page.dart index d4d2baa..1b95acd 100644 --- a/lib/pages/workspace_page.dart +++ b/lib/pages/workspace_page.dart @@ -356,14 +356,19 @@ class _WorkspacePageState extends ConsumerState { } void _showMobileMenu(BuildContext context) { - final width = (MediaQuery.sizeOf(context).width * 0.86) - .clamp(280.0, 340.0) - .toDouble(); + final viewport = MediaQuery.sizeOf(context); + final width = (viewport.width * 0.86).clamp(280.0, 340.0).toDouble(); showShadSheet( context: context, side: ShadSheetSide.left, builder: (sheetContext) => ShadSheet( - constraints: BoxConstraints.tightFor(width: width), + // The desktop sidebars contain Expanded/ListView regions. A left + // ShadSheet only has a minimum height by default, so make the mobile + // viewport height explicit before those flex children are laid out. + constraints: BoxConstraints.tightFor( + width: width, + height: viewport.height, + ), padding: EdgeInsets.zero, scrollable: false, child: Column(