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.line
  • GestureType.circle
  • GestureType.zShape
  • GestureType.unknown

๐Ÿ”ฅ Advanced Usage

Gesture Combination Detection

// Example: Z โ†’ Circle combo
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! ๐Ÿš€