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

[Question] Dismissing a Flushbar from external event #157

Closed
evanblasband opened this issue Oct 9, 2020 · 1 comment
Closed

[Question] Dismissing a Flushbar from external event #157

evanblasband opened this issue Oct 9, 2020 · 1 comment

Comments

@evanblasband
Copy link

I have a flushbar displayed to the user if their email has not been confirmed, and I want it to disappear only when I check a database and see their email has been confirmed otherwise it is always showing. So I have isDissmissable: false, and duration: null (I know it says to avoid this), however is there a way to implement this? I essentially just need a way to check if there is currently a flushbar displayed then find and dismiss it if so. Any thoughts would be really appreciated.

@evanblasband
Copy link
Author

Doing something like this worked for me:

Flushbar emailToast = Flushbar(...)
// show Flushbar
emailToast.show(context);
//dismiss
emailToast.dismiss(context);

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

No branches or pull requests

1 participant