[bug]: Closing dialog would close the SnackBar instead
Describe the bug
Currently, when you open a dialog, then snackbar, and you call the completer(DialogResponse()); inside the dialog, it would actually close the snackbar.
I suppose it's because it shares the same navigation inside the Get package.
What operating system do you use?
macOS
Information about the installed tooling
No response
Steps to reproduce the issue
- registerCustomDialogBuilders ...
- snackbarService.registerCustomSnackbarConfig ...
- showCustomDialog ...
- showCustomSnackBar ...
- completer(DialogResponse()) in dialog
Expected behavior
It should close the dialog. Not the snackbar
Screenshots
No response
Additional Context
No response
A workaround seems to be to call Navigator.of(context).pop(DialogResponse()); instead
Thanks for sharing the workout @dvagala that's an interesting situation, never came accross it before.
It'll be the same for bottom sheets as well I think.
Yeah, it seems all the navigation is shared. Even when you want to close the screen with the _navigationService.back();, it would close the snackbar if it's visible.
I'll describe my use case:
Show a Loading dialog when some processing is happening, but when this processing fails, show an error snackbar, and simultaneously close the Loading dialog.