Skip to content

Pop snackbar #630

Answered by robkri
thegioiso asked this question in Q&A
Dec 1, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

If found this in the documentation of showSnackbar:

To dismiss the snackbar manually, use the following code:

final result = showSnackbar(context, snackbar);
result.remove();

Is this what you are looking for?

EDIT:
To avoid an error when the Snackbar already got dismissed automatically, wrap the call of remove() in an try-catch-block like so: #630 (reply in thread).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@thegioiso
Comment options

@thegioiso
Comment options

@robkri
Comment options

Answer selected by thegioiso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants