Search packages, repositories and app categories

Package detailsv0.0.2

swipe_gesture_recognizer

A simple and lightweight swipe gesture recognizer for a widget in Flutter.

30-day downloads
29
Likes
27
Pub points
30

Install package

flutter pub add swipe_gesture_recognizer

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A lightweight and straightforward swipe gesture recognizer for Flutter widgets. It enables developers to detect horizontal and vertical swipes with minimal setup, enhancing user interaction in apps that rely on touch gestures. Designed for simplicity, it integrates seamlessly into existing widget trees without adding significant overhead. Ideal for creating intuitive navigation or interactive elements based on swipe actions.

Use cases

  • Implementing swipe-to-dismiss functionality
  • Adding horizontal/vertical navigation between screens
  • Creating interactive game controls
  • Enabling gesture-based app interactions

Key features

  • Simple API for detecting swipes
  • Supports horizontal and vertical swipe directions
  • Lightweight with low performance impact
  • Easy integration into any Flutter widget
  • Minimal boilerplate code

Suitable for

  • Developers seeking basic swipe detection
  • Apps requiring simple gesture-based navigation
  • Projects prioritizing performance and simplicity
  • Beginners learning gesture recognition in Flutter

Considerations

  • Limited to basic swipe detection (no complex gestures)
  • No built-in animation support
  • Does not handle multi-touch gestures
  • Not suitable for advanced gesture workflows

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

swipe_gesture_recognizer

A simple and lightweight swipe gesture recognizer for a Flutter widget.

Features

Detects the 4 swipe gestures i.e swipe up, swipe down, swipe left and swipe right.

Getting Started

Pass your widget as the child of this widget. Declare the callback function for the desired swipe direction.


    SwipeGestureRecognizer(
        child: MyWidget(),
        onSwipeLeft: () {
            // DO STUFF WHEN LEFT SWIPE GESTURE DETECTED
        },
        onSwipeRight() {
            // DO STUFF WHEN RIGHT SWIPE GESTURE DETECTED
        },
        onSwipeUp: () {
            // DO STUFF WHEN UP SWIPE GESTURE DETECTED
        },
        onSwipeDown() {
            // DO STUFF WHEN DOWN SWIPE GESTURE DETECTED
        },
    );

Categories

Source repository

Projects using this package

No data available yet.