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

Flushbar not being dismissed when I open a new route #33

Closed
quetool opened this issue Mar 1, 2019 · 2 comments
Closed

Flushbar not being dismissed when I open a new route #33

quetool opened this issue Mar 1, 2019 · 2 comments

Comments

@quetool
Copy link
Contributor

quetool commented Mar 1, 2019

I'll try to explain this issue in my poor english :)

I am currently using Flushbar to show push notifications.
When a notification arrives, a new Flushba" is shown and will be dismissed after 4 seconds.
But, when a new Flushbar is shown and I tap on a button in the current screen to open a new screen/route, that Flushbar is not dismissed and when I go back to the previous screen, the flushbar is there, opened, for ever.

I manage Flushbar from a "main container" that contains all the app, a kind of iOS "appdelegate".
I tried to tell Flushbar to dismiss by implementing RouteObservers (onPush() method) but, ironically, when a flushbar is pushed, routeobservers doesn't observe anymore...

@AndreHaueisen
Copy link
Owner

That is by design. I talk about this in the other open issues and in the docs. When you call dismiss, Flushbar checks if it is the topmost route and only then calls pop(). Otherwise it would pop the new screen instead of the bar.
Flutter does not have something like a popNamed(). You can only remove the topmost route from the stack.
Again, make sure the bar is gone before putting a new route on top of it.

@quetool
Copy link
Contributor Author

quetool commented Mar 1, 2019

Thanks, then I will try again with observers.

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

2 participants