From b8ab840f29451a7f58e7ae7730f2196becbbf454 Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Thu, 5 Oct 2023 15:57:37 -0300 Subject: [PATCH] fix: get instace by context and keep it in memory --- lib/utils/show_general_dialog.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/show_general_dialog.dart b/lib/utils/show_general_dialog.dart index 2385b93851..8faa85d306 100644 --- a/lib/utils/show_general_dialog.dart +++ b/lib/utils/show_general_dialog.dart @@ -9,11 +9,12 @@ Future showArDriveDialog( required Widget content, Color? barrierColor, }) async { - context.read().setShowingAnyDialog(true); + final activityTracker = context.read(); + activityTracker.setShowingAnyDialog(true); return showAnimatedDialog( context, content: content, barrierColor: barrierColor, barrierDismissible: barrierDismissible, - ).then((value) => context.read().setShowingAnyDialog(false)); + ).then((value) => activityTracker.setShowingAnyDialog(false)); }