Particle animation on user interaction with Flutter

Click here for complete, high-res video on YouTube
We don’t harm real moles. (Photo by ahmad kanbar on Unsplash)

A mole widget

Let’s start by showing you some (simplified) code of the mole widget:

The particle animation

Our particle animation starts by overlaying the original mole container. Over the time the particle container shrinks to zero while flying into a random direction.

Mole particles spread our of the time and get smaller.

The result

At the end the we have nice splatter-like animation using a particle system on user interaction.

Click here for complete, high-res video on YouTube

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store