In pre-Compose world, I have several dialogs where...
# compose-android
m
In pre-Compose world, I have several dialogs where I use
suspendCancellableCoroutine
to wait for the result of dialog confirmation. Can a similar approach be used with Compose or do I need to rethink the approach?
f
Theoretically you can do something like that - Snackbar works this way. But Compose Dialogs are not designed to be used this way.
m
It just gets a bit tricky when there are consecutive dialogs
f
Look at how Snackbar handled it. The
.showSnackbar()
there is suspending and waits for any previous Snackbars before showing