β¨ touch_fx
A Flutter package that adds dynamic touch-based particle effects β inspired by interactive visuals seen in games and creative apps.
When users drag their fingers across the screen, glowing animated triangles appear, move, fade, and react like sparks.
π± Demo
π Features
- Interactive particle system using
GestureDetectorandCustomPainter - Randomized triangle size, velocity, color, and rotation
- Automatically removes faded-out triangles for better performance
- Fully customizable and extendable
π§© Usage
1. Add dependency
If you're using this snippet inside a unified example app, link it via path:
dependencies:
touch_fx:
path: ../flutter/touch_fx/
Or, use it directly from GitHub:
touch_fx:
git:
url: https://github.com/MarsadMaqsood/snippets-by-marsad.git
path: flutter/touch_fx
2. Try the example
Check out the example file to see the full implementation and usage in action.
π‘ Ideas for Expansion
- Add circle, star, or sparkle particles
- Support taps or long presses
- Add fade-in/out easing curves
- Particle pooling for performance
β Like It?
Star the repo and follow me for more cool Flutter effects: snippets-by-marsad
π License
MIT β free to use, modify, and share.