β¨ 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
GestureDetector
andCustomPainter
- Randomized triangle size, velocity, color, and rotation
- Automatically removes faded-out triangles for better performance
- Fully customizable and extendable
π§© Usage
1. Add dependency
dependencies:
touch_fx: 1.0.0
2. Example
TouchEffectLayer(
config: TouchEffectConfig(
shape: TouchShape.triangle,
maxParticles: 30,
size: 20,
),
),
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
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as needed.
π Contributions
Contributions and pull requests are welcome! We value your input and appreciate any improvements or suggestions you can provide. Feel free to submit a pull request with your changes.
If you find this package useful, please consider starring the repository it helps others discover it too. Thank you for your support and collaboration!