FLUTTER ECOSYSTEM

BilalShahid13/FlutterSwipeGestureRecognizer

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

FlutterSwipeGestureRecognizer project cover
Stars
7
Forks
4
Last push (UTC)
Jun 5, 2021
Project status
Active
Bilal Shahid GitHub avatar
GITHUB User

Bilal Shahid ↗

Joina.io
LanguagesDartKotlinSwiftObjective-C

Packages published by this repository

Dependencies used

Dependency list 2 items
  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

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
        },
    );