Swipable class
Constructors
Swipable ({Key ? key , @required Widget ? child , void onSwipeRight (Offset finalPosition )?, void onSwipeLeft (Offset finalPosition )?, void onSwipeDown (Offset finalPosition )?, void onSwipeUp (Offset finalPosition )?, void onPositionChanged (DragUpdateDetails details )?, void onSwipeStart (DragStartDetails details )?, void onSwipeCancel (Offset position , DragEndDetails details )?, void onSwipeEnd (Offset position , DragEndDetails details )?, Stream <double > ? swipe , int ? animationDuration = 300 , Curve ? animationCurve = Curves.easeInOut , bool horizontalSwipe = true , bool verticalSwipe = true , double ? threshold = 0.3 })
const
Properties
animationCurve
→ Curve ?
@param animationCurve Curve
Animation timing function.
final
animationDuration
→ int ?
@param animationDuration int
Animation duration (in milliseconds) for the card to swipe atuomatically or get back to its original position on swipe cancel.
final
child
→ Widget ?
@param child Widget
@required
Swipable content.
final
hashCode
→ int
The hash code for this object.
no setter inherited
horizontalSwipe
→ bool
@param horizontalSwipe bool
To enable or disable the swipe in horizontal direction.
defaults to true.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
onPositionChanged
→ void Function(DragUpdateDetails details ) ?
Callback
Hook triggered when the card position changes.
@param details DragUpdateDetails
final
onSwipeCancel
→ void Function(Offset position , DragEndDetails details ) ?
Callback
Hook triggered when the card stopped being dragged and doesn't meet the requirement to be swiped.
@param details DragEndDetails
final
onSwipeDown
→ void Function(Offset finalPosition ) ?
Callback
Hook triggered when the card finished swiping down.
@param finalPosition Offset
final
onSwipeEnd
→ void Function(Offset position , DragEndDetails details ) ?
Callback
Hook triggered when the card stopped being dragged and meets the requirement to be swiped.
@param details DragEndDetails
final
onSwipeLeft
→ void Function(Offset finalPosition ) ?
Callback
Hook triggered when the card finished swiping left.
@param finalPosition Offset
final
onSwipeRight
→ void Function(Offset finalPosition ) ?
Callback
Hook triggered when the card finished swiping right.
@param finalPosition Offset
final
onSwipeStart
→ void Function(DragStartDetails details ) ?
Callback
Hook triggered when the card starts being dragged.
@param details DragStartDetails
final
onSwipeUp
→ void Function(Offset finalPosition ) ?
Callback
Hook triggered when the card finished swiping up.
@param finalPosition Offset
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
swipe
→ Stream <double > ?
@param swipe Stream<double>
Triggers an automatic swipe.
Cancels automatically after first emission.R
The double value sent corresponds to the direction the card should follow (clockwise radian angle).
final
threshold
→ double ?
@param threshold double
Defines the strength needed for a card to be swiped.
The bigger, the easier it is to swipe.
final
verticalSwipe
→ bool
@param verticalSwipe bool
To enable or disable the swipe in vertical direction.
defaults to true.
final