AnimatedContainer — Flutter
The animated Container widget allow simple animation effect to be applied over the Widgets.
AnimatedContainer has a list of parameter some of which includes duration, curve and so on…
Here is a sample code snippet of the above.
In this example, I have animated a container that contains the a text widget as a child
I have also provided a
Flatbutton that will trigger the animation of the above container.,
Thus on each
onPressed() event, the
"animationValue" is increased by a factor of
10 , hence the width of the
AnimatedContainer defined above will get updated with the new value provided by this
setState() is used, it is necessary that the Widget tree should be inside a
Get the complete code here — Source Code
Video tutorial for the above : Click here
Also visit my channel for more…