-
Notifications
You must be signed in to change notification settings - Fork 58
Open

Description
I'm wondering what is the best way to open a dialog?
My scenario:
In the middleware, I'm doing some async backend tasks. Depending on the result, I want to open a dialog to display an error message or to indicate that the user needs to log in again.
When the async task completes, I send another action to change the status, such as showErrorDialog = true
.
In the UI code, I listen for this status (using https://github.com/brianegan/reselect_dart) and when it becomes true
, I open the dialog and set this status to false
(so it will not be reopened).
It works, but it also looks wrong to me.
Is there a better way to open a dialog only when an action is triggered?
Metadata
Metadata
Assignees
Labels
No labels