Building implicit animations in Flutter
Hopefully, the previous section demonstrated that explicit animations are a powerful tool for triggering custom, staggered animations, but also can require a bit of boilerplate.
Fortunately, as with every layer in Flutter’s architecture, animations can be controlled implicitly, or declaratively, with a set of widgets purpose-built to encapsulate some of the complexities of animations. Let’s explore how to animate the transition between excuses using implicit animations.
In Flutter, you can defer the management of animations to the framework by using a collection of implicitly animated widgets. Rather than dealing with Animation
and AnimationController
objects directly, these widgets allow you to animate a widget’s properties while encapsulating the use of those objects.
AnimatedOpacity
is one such widget, which accepts a duration
and animates over that duration when the opacity
value changes, using the old value...