Swipable class

Inheritance

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 setterinherited
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.
finalinherited
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 setterinherited
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

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() SwipableState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited