let's see if someone can help me. I'm trying to implement an animation with hero_animation of a button, that when you press it, it moves to another container above. how could it be done? Something like the image Example Thanks!
I tried to implement the hero_animation tags but I didn't succeed, and the local_hero library no longer works for later versions of flutter.
Flutter provides a Hero widget that allows you to add the animation you want. You can find the documentation here
The key points to understand are:
Herowidget, with the same tagAn exemple of implementation given by the flutter documentation:
Here you have a
PhotoHerowidget used in theScaffoldof HeroAnimation, and another one in the Scaffold of the page that is pushed. Both have the same tag (which is here the photo URL), and the animation is done during the transition between the 2 pages.