Animation

The primary building block of the animation system is the
Animation class. An animation represents a value
of a specific type that can change over the lifetime of
the animation. Most widgets that perform an animation
receive an Animation object as a parameter,
from which they read the current value of the animation
and to which they listen for changes to that value.

addListener

Whenever the animation’s value changes,
the animation notifies all the listeners added with
addListener. Typically, a State
object that listens to an animation calls
setState on itself in its listener callback
to notify the widget system that it needs to
rebuild with the new value of the animation.

AnimatedWidget and

AnimatedBuilder.
The first,

build function.
The second,

addStatusListener

AnimationStatus,
which indicates how the animation will evolve over time.
Whenever the animation’s status changes,
the animation notifies all the listeners added with