vijaycreations
Published in

vijaycreations

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

Output:

Video tutorial for the above : Click here

Other contributions.,

Also visit my channel for more…
vijaycreations

--

--

A list of Flutter Tutorials and app templates

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

Hai👋 I’m a flutter developer experienced in designing and developing stunning mobile apps. Reach out for freelance projects: vijaycreations02@gmail.com