Flutter tiene soporte de animaciones potente y flexible — desde animaciones implícitas simples hasta animaciones explícitas completamente controladas. Las animaciones mejoran la UX con transiciones suaves y movimiento, y el sistema basado en widgets de Flutter las hace accesibles.
Animaciones implícitas (la forma fácil)
// implicitly-animated widgets animate AUTOMATICALLY when their properties change
AnimatedContainer(
duration: Duration(milliseconds: 300),
width: _expanded ? 200 : 100, // change width → it animates smoothly
height: _expanded ? 200 : 100,
color: _expanded ? Colors.blue : Colors.red,
)
// just change the value (with setState) → Flutter animates the transition
// others: AnimatedOpacity, AnimatedPadding, AnimatedPositioned, etc.
Las animaciones implícitas (, , etc.) se animan automáticamente cuando sus propiedades cambian — la forma más fácil de agregar animación.
