single_touch_gesture 1.0.1
single_touch_gesture: ^1.0.1 copied to clipboard
A Flutter package that prevents multiple gesture recognition, allowing only one touch at a time.
Single Touch Gesture 📱✨ #
A Flutter package that prevents multiple touch gestures, allowing only one pointer at a time.
📌 Overview #
single_touch_gesture is a Flutter package that ensures only one pointer (touch event) is recognized at a time. This helps prevent unwanted multi-touch interactions in widgets like Dismissible, Checkbox, Sliders, and Buttons.
🎯 Features #
✅ Prevents multiple gestures from being recognized at once.
✅ Useful for gesture-sensitive widgets like swipe actions.
✅ Works seamlessly with Flutter's GestureDetector and RawGestureDetector.
✅ Lightweight and easy to integrate.
🎥 Demo #
📌 Dismissible Example #
🔹 Left : ❌ Without single_touch_gesture → Multiple touches cause unexpected behavior.
🔹 Right : ✅ With single_touch_gesture → Only one touch is registered at a time.
| ❌ Without `single_touch_gesture` | ✅ With `single_touch_gesture` |
|
|
🚀 Installation #
Add the package to your pubspec.yaml:
dependencies:
single_touch_gesture: ^1.0.0
Then, run:
flutter pub get
📖 Usage #
To see how to use single_touch_gesture, check out the example folder in the repository.
🛠 Development & Contribution #
Feel free to contribute! To set up the project locally:
git clone https://github.com/YashrajsinhYz/single_touch_gesture.git
cd single_touch_gesture
flutter pub get
Run Tests #
flutter test
Submit a Pull Request #
- Fork the repository.
- Create a new branch (
feature-name). - Make changes and commit.
- Push to your branch and open a PR.
📬 Support & Issues #
- For bug reports and feature requests, please open an issue.
- If you like this package, give it a ⭐ on GitHub!
📜 License #
This project is licensed under the MIT License - see the LICENSE file for details.