Flutter-ს აქვს მძლავრი, მოქნილი ანიმაციის მხარდაჭერა — მარტივი implicit ანიმაციებიდან სრულად კონტროლირებული explicit ანიმაციებამდე. ანიმაციები აუმჯობესებს UX-ს გლუვი გადასვლებითა და მოძრაობით, და Flutter-ის widget-ზე დაფუძნებული სისტემა მათ ხელმისაწვდომელს ხდის.
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 ანიმაციები (, და ა.შ.) ავტომატურად ატრიალებენ მათ თვისებებს დაცვლისას — ყველაზე მარტივი გზა ანიმაციის დასამატებლად.
