In my project, when ChangeNotifier
class receives a status it sets up a boolean and calls notifyListeners()
. In my main build()
function, I then check the pending-boolean and display the dialog accordingly - but I am only able to display the dialog by giving it a small delay in the build method - it seems the context is missing.
TL;DR:
Is there any way to display a dialog from within the ChangeNotifier
class?