Flutter પાસે શક્તિશાળી, લવચક animation support છે — સરળ implicit animations થી સંપૂર્ણ-નિયંત્રિત explicit animations સુધી. Animations UX ને smooth transitions અને motion સાથે વધારે છે, અને Flutter ની widget-based system તેમને સાધારણ બનાવે છે.
Implicit animations (સરળ રીત)
// 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.
Implicit animations (, , વગેરે) આપોઆપ animate કરે છે જ્યારે તેમના properties બદલાય — animation ઉમેરવાની સૌથી સરળ રીત.
