Published in


AnimatedContainer — Flutter

AnimatedContainer Widget

The animated Container widget allow simple animation effect to be applied over the Widgets.

The 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 Text(“Connected :)”)

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 "animationValue" .

Since setState() is used, it is necessary that the Widget tree should be inside a StatefulWidgetClass .

Get the complete code here — Source Code


Video tutorial for the above : Click here

Other contributions.,

Also visit my channel for more…




A list of Flutter Tutorials and app templates

Recommended from Medium

Day54 of #100DaysOfCode

How game emulators learned to teach old smartphone GPUs new tricks

Day95 of #100DaysOfCode

Change app Launcher icons-Flutter

Neon Light 💡 effect — Flutter

Day32 of #100DaysOfCode

Carousel Slider — Flutter

Day42 of #100DaysOfCode

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vijay R

Vijay R

Flutter Developer

More from Medium

Flutter Ice Breaker: Shared_Preferences

Building Android Widgets In Flutter: Remember these Simple Points

Flutter Dark/Light Theme

Flutter Textfield Onchanged Explained With Example-Best Flutter Guide