These properties belong to a custom State class so they
can be updated when the user taps a button.

2. Build an AnimatedContainer using the properties

Next, build the AnimatedContainer using the properties defined in the
previous step. Furthermore, provide a duration that defines how long
the animation should run.

3. Start the animation by rebuilding with new properties

Finally, start the animation by rebuilding the
AnimatedContainer with the new properties.
How to trigger a rebuild?
Use the setState() method.

Add a button to the app. When the user taps the button, update
the properties with a new width, height, background color and border radius
inside a call to setState().

A real app typically transitions between fixed values (for example,
from a grey to a green background). For this app,
generate new values each time the user taps the button.

Interactive example

Animate a widget using a physics simulation