Flutter मा शक्तिशाली, लचकदार animation समर्थन छ — साधारण 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 (, , आदि) आफ्नो properties परिवर्तन हुँदा स्वचालित रूपमा animate हुन्छन् — animation थप्ने सबैभन्दा सजिलो तरिका।
