v0.0.1
swipe
Flutter에서 위, 아래, 왼쪽 및 오른쪽 스와이프를 감지하는 간단한 방법입니다.
46좋아요 1.9천30일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
Flutter에서 위, 아래, 왼쪽 및 오른쪽 스와이프를 감지하는 간단한 방법입니다.
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
The easy way to detect swipe up, down, left and right in Flutter.
Add dependency to your flutter project:
$ flutter pub add swipe
or
dependencies:
swipe: ^0.0.1
or
dependencies:
swipe:
git:
url: git://github.com/salkuadrat/swipe.git
Then run flutter pub get.
Here is a simple way of using Swipe.
Swipe(
child: ..., // your child widget
onSwipeUp: () {
// do something when swiping up
},
onSwipeDown: () {
// do something when swiping down
},
onSwipeLeft: () {
// do something when swiping left
},
onSwipeRight: () {
// do something when swiping right
},
)
Swipe widget comes with additional parameters to customize your swiping experience.
Swipe(
child: ...,
onSwipeUp: ...,
onSwipeDown: ...,
onSwipeLeft: ...,
onSwipeRight: ...,
verticalMaxWidthThreshold: 50,
verticalMinDisplacement: 100,
verticalMinVelocity: 300,
horizontalMaxHeightThreshold: 50,
horizontalMinDisplacement: 100,
horizontalMinVelocity: 300,
)
You can try a working example here.