This recipe contains the preparation for the next two recipes that follow, and you have added a few important features that make possible animating widgets in Flutter. In particular, there are three important classes that you have used:
- Animation
- Tween
- AnimationController
You have declared an Animation at the top of the _ShapeAnimationState class, with the following declaration:
Animation<double> animation;
The Animation class takes some values and transforms them into animations: you use it to interpolate the values used for your animation. Animation<double> means that the values that will be interpolated are of type double.
An instance of Animation is not bound to other widgets on the screen: it's only aware of the state of the animation itself during each frame change.
A Tween (short for "in-between") contains the values of the property or properties that change during the animation. Consider this instruction:
animation = Tween<double...