swipe_gesture_recognizer 0.0.1 copy "swipe_gesture_recognizer: ^0.0.1" to clipboard
swipe_gesture_recognizer: ^0.0.1 copied to clipboard

outdated

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

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

27
likes
30
pub points
72%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on swipe_gesture_recognizer