From 260002270fcdeaa5e3e11e3da73c9b8ea822c71b Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 10 May 2020 18:32:14 +0200 Subject: [PATCH] Fix issue --- lib/utils/ui_utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/ui_utils.dart b/lib/utils/ui_utils.dart index 3e855cd..d559f28 100644 --- a/lib/utils/ui_utils.dart +++ b/lib/utils/ui_utils.dart @@ -150,8 +150,8 @@ Future showConfirmDialog({ if (title == null) title = tr("Confirm operation"); // Avoid potential theme issues - var ctx = Scaffold.of(context).context; - ctx = ctx != null ? ctx : context; + final scaffold = Scaffold.of(context, nullOk: true); + final ctx = scaffold != null ? scaffold.context : context; final result = await showDialog( context: ctx,