swiper_detector 0.0.1
swiper_detector: ^0.0.1 copied to clipboard
A flutter package detect left ,right,up, down siwpe.
Swipe Detector #
Author: woodjobber #
A package to detect your swipe directions and provides you with callbacks to handle them.
Usage #
SwipeDetector(
onSwipe: (direction, offset) {
print(direction);
},
onSwipeUp: (offset) {
print('up');
},
onSwipeDown: (offset) {
print('down');
},
onSwipeLeft: (offset) {
print('left');
},
onSwipeRight: (offset) {
print('right');
},
child: const Container(
padding: EdgeInsets.all(16),
child: Text(
'Swipe me!',
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
),
),