Flutter मध्ये शक्तिशाली, लचकदार animation समर्थन आहे — साध्या implicit animations पासून पूर्णपणे नियंत्रित explicit animations पर्यंत. अॅनिमेशन्स UX ला गुळगुळीत संक्रमण आणि गती सह सुधारतात, आणि Flutter ची widget-आधारित प्रणाली त्यांना सुलभ बनवते.
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 (, , इ.) त्यांच्या गुणधर्म बदलल्यावर स्वयंचलितपणे अॅनिमेट होतात — अॅनिमेशन जोडण्याचा सर्वात सोपा मार्ग.
