From 8c3f2e7572b5de71f29792baee9a0b82cd59e13f Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 6 Dec 2024 23:29:43 -0800 Subject: [PATCH] action_sheet: Fix use of stale context On hot reload, the `DesignVariables.of(context)` lookup in this builder could throw because `context` was no longer mounted. (I'm not sure if the issue could also be triggered in release builds.) --- lib/widgets/action_sheet.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/action_sheet.dart b/lib/widgets/action_sheet.dart index a0634a5d9a..2e0a2699fa 100644 --- a/lib/widgets/action_sheet.dart +++ b/lib/widgets/action_sheet.dart @@ -64,7 +64,7 @@ void showMessageActionSheet({required BuildContext context, required Message mes clipBehavior: Clip.antiAlias, useSafeArea: true, isScrollControlled: true, - builder: (BuildContext _) { + builder: (BuildContext context) { return SafeArea( minimum: const EdgeInsets.only(bottom: 16), child: Padding(