Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to close previous topSnackBar before showing new one #6

Closed
assylman opened this issue Apr 29, 2021 · 2 comments
Closed

Need to close previous topSnackBar before showing new one #6

assylman opened this issue Apr 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@assylman
Copy link

Regular SnackBar has this method to hide current SnackBar - ScaffoldMessenger.of(context).hideCurrentSnackBar();
Is there any function which closes previous one before showing topSnackBar?

@vizhan-lanars vizhan-lanars added enhancement New feature or request PoC Proof of concept. and removed enhancement New feature or request labels May 14, 2021
@vizhan-lanars vizhan-lanars added enhancement New feature or request and removed PoC Proof of concept. labels Sep 21, 2021
@vizhan-lanars
Copy link
Collaborator

Hi, @nurassylive
New version update (v1.0.1)
Dismiss the previous snackbar before displaying a new one (snackbars don't overlay each other now).

@fullflash
Copy link

fullflash commented Aug 11, 2023

snackbar still stucks when you call showTopSnackbar very fast and you can able only dismiss the last one other stacked

actually there is a check in the code for _previousEntry but because it is not mounted yet it is not removed.
need to implement a logic like marking previous entry to be removed and remove once this entry is mounted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants