Flutter میں طاقتور، لچکدار animation سپورٹ ہے — سادہ implicit animations سے لے کر مکمل طور پر کنٹرول شدہ explicit animations تک۔ Animations UX کو صاف ستھرا transitions اور motion کے ذریعے بہتر بناتی ہیں، اور Flutter کا widget-based نظام انہیں سمجھنا آسان بناتا ہے۔
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 کرتی ہیں جب ان کی خصوصیات تبدیل ہوں — animation شامل کرنے کا سب سے آسان طریقہ۔
