zeba_academy_gesture_engine 0.0.1
zeba_academy_gesture_engine: ^0.0.1 copied to clipboard
Advanced custom gesture recognition engine for Flutter.
zeba_academy_gesture_engine #
๐ Advanced custom gesture recognition engine for Flutter.
A powerful, lightweight, and extensible gesture engine that allows developers to create and recognize custom gestures like lines, circles, Z-shapes, and combinations โ all without heavy dependencies.
โจ Features #
- ๐ฏ Custom gesture recognition (Line, Circle, Z-shape)
- ๐ Gesture combinations support
- โก Velocity tracking
- ๐งญ Direction analysis
- ๐งผ Gesture smoothing (noise reduction)
- ๐งฉ Easy-to-use widget API
- ๐ Lightweight & no external dependencies
๐ฆ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_gesture_engine: ^0.1.0
Then run:
flutter pub get
๐ Usage #
Basic Example #
import 'package:zeba_academy_gesture_engine/zeba_academy_gesture_engine.dart';
GestureWidget(
onGesture: (type, velocity) {
print("Gesture: $type | Velocity: $velocity");
if (type == GestureType.circle) {
print("Circle detected");
}
},
child: Container(
color: Colors.white,
child: const Center(
child: Text("Draw a gesture"),
),
),
)
๐ฎ Gesture Types #
GestureType.lineGestureType.circleGestureType.zShapeGestureType.unknown
๐ฅ Advanced Usage #
Gesture Combination Detection #
// Example: Z โ Circle combo
Navigation Example #
if (type == GestureType.circle) {
Navigator.pushNamed(context, '/home');
}
๐ง How It Works #
The engine processes touch input into gesture points and performs:
- Distance calculations
- Direction tracking using
atan2 - Velocity computation
- Shape matching using geometric heuristics
๐ Project Structure #
lib/
โโโ gesture_engine.dart
โโโ src/
โโโ gesture_point.dart
โโโ gesture_analyzer.dart
โโโ gesture_matcher.dart
โโโ gesture_controller.dart
โโโ gesture_widget.dart
โโโ gesture_types.dart
๐งช Testing #
Run tests using:
flutter test
๐ Roadmap #
- โจ $1 Gesture Recognizer implementation
- โจ Multi-touch gesture support
- โจ Gesture templates system
- โจ Visual gesture debugger
- โจ Bezier curve smoothing
๐ License #
This project is licensed under the GNU General Public License (GPL).
๐จโ๐ป About Me #
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin
๐ Your all-in-one no-bloat hub! #
๐ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐ปโจ
Zeba Academy is a learning platform dedicated to coding, technology, and development. โก Visit our main site: zeba.academy โก Explore hands-on courses and resources at: code.zeba.academy โก Check out our YouTube for more tutorials: zeba.academy โก Follow us on Instagram: zeba.academy
๐ Contributing #
Contributions are welcome! Feel free to open issues or submit pull requests.
โญ Support #
If you like this package, give it a โญ on GitHub and share it with the community!
Thank you for visiting! ๐