AnimationController is a class that we can use to play an animation forward or in reverse,
AnimationController produces values that range from 0 to 1, during a given duration.AnimationController generates a new value whenever Flutter needs to draw a new frame (using a Ticker)Setting up an AnimationController requires 5 steps:
StatefulWidget
SingleTickerProviderStateMixin to the State classlate final AnimationController _animationController;
AnimationController in initState()
dispose() methodFor an overview of how to reduce all the boilerplate code, see this tutorial:
7 comments