Skip to content

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

License

Notifications You must be signed in to change notification settings

ern-nor/FlutterSwipeGestureRecognizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 85.1%
  • Kotlin 7.4%
  • Swift 6.9%
  • Objective-C 0.6%