From 3df8b67002d4b6e5b879e9383ff62f6a6d47c4ab Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Wed, 27 May 2026 22:05:39 +0200 Subject: [PATCH] fix: wrap bottom bar menu button in Builder to get Scaffold context Scaffold.of() requires a descendant context of the Scaffold widget. Using the State's build context (which is the Scaffold's parent) caused an assertion failure when tapping the 'Open folders' button. Co-Authored-By: Claude Sonnet 4.6 --- lib/ui/screens/email_list_screen.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ui/screens/email_list_screen.dart b/lib/ui/screens/email_list_screen.dart index 5d80440..a10e85a 100644 --- a/lib/ui/screens/email_list_screen.dart +++ b/lib/ui/screens/email_list_screen.dart @@ -313,10 +313,12 @@ class _EmailListScreenState extends ConsumerState { return BottomAppBar( child: Row( children: [ - IconButton( - icon: const Icon(Icons.menu), - tooltip: 'Open folders', - onPressed: () => Scaffold.of(context).openDrawer(), + Builder( + builder: (context) => IconButton( + icon: const Icon(Icons.menu), + tooltip: 'Open folders', + onPressed: () => Scaffold.of(context).openDrawer(), + ), ), ], ),