v0.0.2
swipe_gesture_recognizer
一個簡單輕量的滑動手勢識別器,用於 Flutter 中的 widget。
27喜歡 14近 30 天下載30Pub 分數
平台暫無資料
一個簡單輕量的滑動手勢識別器,用於 Flutter 中的 widget。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
A simple and lightweight swipe gesture recognizer for a Flutter widget.
Detects the 4 swipe gestures i.e swipe up, swipe down, swipe left and swipe right.
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
},
);