O Flutter tem suporte poderoso e flexível para animações — desde animações implícitas simples até animações explícitas totalmente controladas. As animações aprimoram a experiência do usuário com transições e movimento suave, e o sistema baseado em widgets do Flutter as torna acessíveis.
Animações implícitas (a 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.
Animações implícitas (, , etc.) animam automaticamente quando suas propriedades mudam — a forma mais fácil de adicionar animação.
