u/gladimdimin r/FlutterDev • Recommends
Building Game with Flutter #4: Animate Leader Level Up
#flutter#animation#streambuilder
1.2K subscribers • 3 videos on Hallway
Intermediate. Assumes working knowledge.
678 views5 years ago1 recommendation
Mobile developmentGame developmentFlutter and React NativeGame programming
Dmytro Gladkyi demonstrates how to implement and reset level-up animations in a Flutter game using StreamBuilder, AnimationBuilder, and widget keys.
In this video I will add an animation played when the Leader levels ups. We start with simple Stack, then add StreamBuilder, AnimationBuilder. Then we try to distinguish leader.level changes via the (wrong!) didUpdate method in order to reset animation on the next runs. The solution is even simpler with the Widget keys in Flutter: by telling Disappear(key: widget.leader.level) we tell Flutter that once the level changed - build another Widget from scratch and restart animmations. This idea came later, it is not in the video :) But anyway it works =) The game is not yet released but already has a name: "Loca Deserta: Chumaki". This is a trading game set in XVII century in Ukraine. The game is written in 100% Flutter without additional game engines. The game universe official site: locadeserta.com Якщо ви ци розумієте, то ласкаво просимо в телеграм канал присвячений розробці ігор на флатер: t.me/locadesertachumaki Contents Intro Add Stack Some StreamBuilder New Disappear widget Add Animation didUpdateWidget Always dispose controllers Add Widget Keys Summaryu/gladimdimin r/FlutterDev • Recommends