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

Would be great to have a callback on animationEnded #10

Open
FrankDomburg opened this issue Mar 22, 2022 · 2 comments
Open

Would be great to have a callback on animationEnded #10

FrankDomburg opened this issue Mar 22, 2022 · 2 comments

Comments

@FrankDomburg
Copy link

Sometimes, I want to do stuff after the local heroes are done animating.

Current flow is that I change the inflightbuilder to add False to an array, whenever a local hero starts animating, and to add True to the same array when the status is animationStatus == completed. Whenever the number of True == number of False, I do what I want to do next.

Does it make sense for the LocalHeroController to provide a callback to do, I guess that would be way more efficient than a bunch of setState commands?

@martipello
Copy link

martipello commented Nov 11, 2022

@FrankDomburg created a PR for this, the callback is slightly delayed by about 300 milliseconds but works great otherwise, but looking at the other PRs that havent been merged it may be better to create a new package and just link back to this

@martipello
Copy link

i published my fork with the added callback here
https://pub.dev/packages/local_hero_with_callback

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