Flutter में शक्तिशाली, लचीला animation समर्थन है — सरल implicit animations से लेकर पूरी तरह नियंत्रित explicit animations तक। animations smooth transitions और motion के साथ UX को बढ़ाती हैं, और Flutter का widget-आधारित 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 जोड़ने का सबसे आसान तरीका।
