Flutter ਕੋਲ ਸ਼ਕਤੀਸ਼ਾਲੀ, ਲਚਕਦਾਰ animation ਸਮਰਥਨ ਹੈ — ਸਾਧਾਰਨ implicit ਐਨੀਮੇਸ਼ਨ ਤੋਂ ਲੈ ਕੇ ਪੂਰੀ ਤਰ੍ਹਾਂ ਨਿਯੰਤਰਿਤ explicit ਐਨੀਮੇਸ਼ਨ ਤੱਕ। ਐਨੀਮੇਸ਼ਨ ਨਿਰਵਿਘਨ ਤਬਦੀਲੀਆਂ ਅਤੇ ਮੋਸ਼ਨ ਦੇ ਨਾਲ UX ਨੂੰ ਬਿਹਤਰ ਬਣਾਉਂਦਾ ਹੈ, ਅਤੇ Flutter ਦਾ widget-based ਸਿਸਟਮ ਇਸ ਨੂੰ ਪਹੁੰਚਯੋਗ ਬਣਾਉਂਦਾ ਹੈ।
Implicit ਐਨੀਮੇਸ਼ਨ (ਆਸਾਨ ਤਰੀਕਾ)
// 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 ਐਨੀਮੇਸ਼ਨ (, , ਆਦਿ) ਆਪਣੇ ਆਪ ਨੂੰ animate ਕਰਦੀ ਹੈ ਜਦੋਂ ਉਹਨਾਂ ਦੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਬਦਲਦੀਆਂ ਹਨ — ਐਨੀਮੇਸ਼ਨ ਸ਼ਾਮਲ ਕਰਨ ਦਾ ਸਭ ਤੋਂ ਆਸਾਨ ਤਰੀਕਾ।
