AppinioSwiper class

Inheritance

Constructors

AppinioSwiper({Key? key, required IndexedWidgetBuilder cardBuilder, required int cardCount, AppinioSwiperController? controller, int? initialIndex, Duration duration = const Duration(milliseconds: 200), double maxAngle = 15, bool invertAngleOnBottomDrag = true, double threshold = 50, int backgroundCardCount = 1, double backgroundCardScale = .9, Offset? backgroundCardOffset, bool isDisabled = false, bool loop = false, SwipeOptions swipeOptions = const SwipeOptions.all(), VoidCallback? onTapDisabled, OnSwipe? onSwipeBegin, OnSwipe? onSwipeEnd, void onCardPositionChanged(SwiperPosition position)?, VoidCallback? onEnd, AxisDirection defaultDirection = AxisDirection.right, bool allowUnSwipe = true, bool allowUnlimitedUnSwipe = true, void onUnSwipe(SwiperActivity activity)?, void onSwipeCancelled(SwiperActivity activity)?})
const

Properties

allowUnlimitedUnSwipe bool
Allow unlimited unswipe.
final
allowUnSwipe bool
Allow unswipe.
final
backgroundCardCount int
Background cards count
final
backgroundCardOffset Offset?
The amount to offset each successive background card relative to the card before it.
final
backgroundCardScale double
The amount to scale each successive background card down by,
final
cardBuilder IndexedWidgetBuilder
The indexed widget builder that builds a card for the given index.
final
cardCount int
The number of cards in the stack.
final
controller AppinioSwiperController?
A controller that provides programmatic control of the swiper and notifies on swiper state changes.
final
defaultDirection AxisDirection
The default direction in which the card gets swiped when triggered by controller.
final
duration Duration
The duration of swipe animations.
final
hashCode int
The hash code for this object.
no setterinherited
initialIndex int?
The card index to start the swiper at.
final
invertAngleOnBottomDrag bool
Sets whether the card should angle in the opposite direction when it is dragged from the bottom half.
final
isDisabled bool
Set to true to disable swiping.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loop bool
Set to true if you want the card stack to loop back to the beginning when the user swipes to the end.
final
maxAngle double
The maximum angle the card reaches while horizontally swiping.
final
onCardPositionChanged → (void Function(SwiperPosition position)?)
A callback that is called with the card's SwiperPosition whenever the position changes.
final
onEnd VoidCallback?
Function that is called when the card stack runs out of cards.
final
onSwipeBegin OnSwipe?
Callback that fires with the new swiping activity (eg a user swipes or the controller triggers a programmatic swipe).
final
onSwipeCancelled → (void Function(SwiperActivity activity)?)
This callback is called when user cancels the swipe before reaching threshold
final
onSwipeEnd OnSwipe?
Callback that fires with a swipe activity after the activity is complete.
final
onTapDisabled VoidCallback?
Function that is called when a user attempts to swipe but swiping is disabled.
final
onUnSwipe → (void Function(SwiperActivity activity)?)
This callback is called when user unswipe the card
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
swipeOptions SwipeOptions
What swipe directions to allow.
final
threshold double
The minimum distance a user has to pan the card before triggering a swipe animation.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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