Check for context first before showing popup

This commit is contained in:
OmarHatem 2023-02-15 17:50:48 +02:00
parent 6d7ce369bf
commit 54dab5883f

View file

@ -229,7 +229,8 @@ class DashboardPage extends BasePage {
}
await Future<void>.delayed(Duration(seconds: 1));
await showPopUp<void>(
if (context.mounted) {
await showPopUp<void>(
context: context,
builder: (BuildContext context) {
return AlertWithOneAction(
@ -239,6 +240,7 @@ class DashboardPage extends BasePage {
buttonText: S.of(context).understand,
buttonAction: () => Navigator.of(context).pop());
});
}
});
var needToPresentYat = false;