How do I animate a widget?

In Android, you either create animations using XML, or call the animate()
method on a view. In Flutter, animate widgets using the animation
library by wrapping widgets inside an animated widget.

In Flutter, use an AnimationController which is an Animation<double>
that can pause, seek, stop and reverse the animation. It requires a Ticker
that signals when vsync happens, and produces a linear interpolation between
0 and 1 on each frame while it’s running. You then create one or more
Animations and attach them to the controller.

For example, you might use CurvedAnimation to implement an animation
along an interpolated curve. In this sense, the controller
is the “master” source of the animation progress and the CurvedAnimation
computes the curve that replaces the controller’s default linear motion.
Like widgets, animations in Flutter work with composition.