Flutter ships with few built-in animated widgets. They are derived from AnimatedWidget
class. They are named as FooTransition
where Foo
is the name of non-animated version of that widget or is the name of a animation. Commonly used animated widgets include:
AnimatedBuilder
: The widget AnimatedBuilder
is derived from AnimatedWidget
. This widget violates the naming convention.Align
.DecoratedBox
.DefaultTextStyleTransition
: which is an animated version of DefaultTextStyle
.PositionedTransition
: which is an animated version of Positioned
.RotationTransition
: which animates the rotation of a widget.ScaleTransition
: which animates the scale of a widget.SizeTransition
: which animates its own size.SlideTransition
: which animates the position of a widget relative to its normal position.FadeTransition
: which is an animated version of Opacity
.AnimatedModalBarrier
: which is an animated version of ModalBarrier
.The above listed widgets are derived from AnimatedWidget
. These class requires a Animation<T>
(Listenable
) object through their specific property. They use this Animation
object to update their child
whenever the Animation
object changes their values. These are done by the widget itself. You have the full control of the animation, like using the animation object you can stop an animation or resume an animation.