swipe

Creator: coderz1093

Last updated:

0 purchases

swipe Image
swipe Images

Languages

Categories

Add to Cart

Description:

swipe

Swipe #
The easy way to detect swipe up, down, left and right in Flutter.
Getting Started #
Add dependency to your flutter project:
$ flutter pub add swipe
copied to clipboard
or
dependencies:
swipe: ^0.0.1
copied to clipboard
or
dependencies:
swipe:
git:
url: git://github.com/salkuadrat/swipe.git
copied to clipboard
Then run flutter pub get.
Usage #
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
},
)
copied to clipboard
Customization #
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,
)
copied to clipboard
Example #
You can try a working example here.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.