Skip to content

Commit

Permalink
action_sheet: Fix use of stale context
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
gnprice committed Dec 7, 2024
1 parent 942b02e commit ef8ff00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/widgets/action_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ef8ff00

Please sign in to comment.