Flutter › Flutter Animations Basics

What is the difference between implicit and explicit animations in Flutter, and which specific approach is generally simpler to actually implement for a straightforward, everyday animation need?

Beginner

Answer

An implicit animation, such as using the AnimatedContainer widget, automatically handles smoothly animating a change to one of its properties, such as its width or color, without you needing to manually manage any underlying AnimationController yourself, making it considerably simpler to implement for a straightforward everyday animation need, whereas an explicit animation, built directly using an AnimationController together with an Animation object, gives you significantly more fine grained control over the animation's exact behavior, at the reasonable cost of requiring noticeably more code and a genuinely more careful management of that animation's entire lifecycle.
AnimatedContainer(
  duration: Duration(milliseconds: 300),
  width: isExpanded ? 200 : 100,
  color: isExpanded ? Colors.blue : Colors.grey,
)
Real-world example A settings screen uses a simple AnimatedContainer to smoothly animate a section's width and color whenever a user taps to expand or collapse it, avoiding the need to write and manage a considerably more complex explicit animation just for this genuinely simple use case.

Common follow-ups: When would an implicit animation simply not be sufficiently flexible for a given specific need?;What other implicit animation widgets does Flutter provide besides AnimatedContainer?