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

addListener in BeamLocation is never called in "books_bloc" example #507

Closed
dedonnodev opened this issue Apr 14, 2022 · 3 comments
Closed
Labels
Milestone

Comments

@dedonnodev
Copy link

With this example, function _listener inside BooksLocation is never called.

Beamer version => master

To Reproduce:

  1. get books_bloc example
  2. add a print inside _listener function inside BooksLocation

I don't know if it's an old example and needs to be updated or i don't get it how it works. But i migrated my app to that example hoping that was a good idea.... 😭
And it looks a good idea for use bloc and beamer together.

@slovnicki
Copy link
Owner

Hey @3lB4rt0 👋
Thanks for creating an issue!

I will check this later today, but it very well might be that the example is outdated. It happens a lot 😢
The listener can definitely be added to a BeamLocation, but my first guess is that it is not triggered because navigation is not done through BeamLocation directly.

I guess it's time for me to review this example... I'll keep you updated.

@dedonnodev
Copy link
Author

Really thank you!
I will continuously update this page for news 😂

Have a good debug!

@slovnicki slovnicki added this to the v1.5.0 milestone Apr 21, 2022
@slovnicki
Copy link
Owner

Hey @dedonnodev
I looked at this today and it was a little bit of both - outdated example and missing functionality.

I added an onUpdate to BeamLocation and updated the example, you can see everything in 88c8537.
There's no need to manually register additional listeners, but just override onUpdate.

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

No branches or pull requests

2 participants