Confetti Animation in Flutter
Dependencies
confetti: ^0.5.4+1
Implementation
- Create a
ConfettiController
and initialize it in theinitState(){}
- Create a Confetti Widget inside the widget tree.
The parameters for this ConfettiWidget
can be configured based on individual’s choice.
- Call the
play()
method whenever you want the animation to get triggered. In our case we shall be writing it inside theonpressed(){}
method of aFlatbutton
.
🥳 That’s it., Run your app to see the confetti animation in action 🚀
👩💻Get the Complete Source Code 👉: https://github.com/vijayinyoutube/confetti
Other articles you may like.,
🟡 Change App Launcher Icon in Flutter
🔴 AnimatedContainer Widget in Flutter
Flutter Tutorials
If you want to know more about Flutter and various Widgets in Flutter…?🤓 Then visit my channel vijaycreations🚩
Thanks.,