Introducing animations
In Flutter, animations are widely supported, and the framework provides multiple ways of animating widgets. Additionally, there are built-in ready-to-use animations that we only need to plug into widgets to make them animate. Though Flutter abstracts many of the complexities that animations involve, there are some important concepts we need to understand before diving into the subject of animations.
The Animation<T> class
In Flutter, the Animation
class consists of a status and a value of the T
type, where T
is defined on the instantiation of the Animation
class. The animation’s status corresponds to the animation’s state (that is, if it’s running or completed); its value changes while the animation runs, and it is this value that is intended to drive any widget changes during the animation’s execution.
This class also exposes callbacks so that other classes can know the animation’s current status and value.
...