Animate a widget using a physics simulation

Fade a widget in and out

Animate the properties of a container

Cookbook

Animation

Animate the properties of a container

1. Create a StatefulWidget with default properties

2. Build an AnimatedContainer using the properties

3. Start the animation by rebuilding with new properties

Interactive example

The Container class provides a convenient way
to create a widget with specific properties:
width, height, background color, padding, borders, and more.

Simple animations often involve changing these properties over time.
For example,
you might want to animate the background color from grey to green to
indicate that an item has been selected by the user.