✨ 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 and CustomPainter
  • 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.

Libraries

touch_fx