Manage and control multiple dialogs with GetX #3181
MauroGentile
started this conversation in
General
Replies: 1 comment
-
I could say that this work is 100% done for snackbars (I don't remember if I implemented it in version 4 or 5, but it is definitely implemented). For dialogs this is not ready yet. Getx5 allows you to close a specific snackbar when you open it, as well as you can close just the current one, or all snackbars. The return of the snackbar creation method is where you would have granular control. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my app, I have different dialogs and snackbars that can be opened at any time and in any order. I also want to be able to close these elements not only with an OK button but also through a command triggered by a listener.
For example, if the Wi-Fi connection drops, a dedicated listener catches the event and triggers a Get.defaultDialog with a cancel button. However, if the connection is reestablished, I want to close this dialog programmatically. In this context, using Get.back() is not ideal because other snackbars or dialogs may have opened in the meantime and Get.back would close the incorrect element.
For this reason, I would like to close the dialog using an identifier to be stored and then to be used to close the element when needed but I can't find a way to do so in the documentation. Can anyone help me?
Beta Was this translation helpful? Give feedback.
All reactions