swipedetector 0.0.4 swipedetector: ^0.0.4 copied to clipboard
A Flutter package to detect up, down, left, right swipes.
example #
A new Flutter project.
Getting Started #
For help getting started with Flutter, view our online documentation.
Usage #
Using SwipeDetector
is straightforward, just wrap it around the Widget
you want to detect swipes on.
SwipeDetector(
child: ... //You Widget Tree here
),
onSwipeUp: () {
setState(() {
_swipeDirection = "Swipe Up";
});
},
onSwipeDown: () {
setState(() {
_swipeDirection = "Swipe Down";
});
},
)