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.