CardSwiper<T extends Widget> class

Inheritance

Constructors

CardSwiper({Key? key, required NullableIndexedWidgetBuilder cardBuilder, required int cardsCount, CardSwiperController? controller, int initialIndex = 0, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 20, vertical: 25), Duration duration = const Duration(milliseconds: 200), double maxAngle = 30, int threshold = 50, double scale = 0.9, bool isDisabled = false, CardSwiperOnTapDisabled? onTapDisabled, CardSwiperOnSwipe? onSwipe, CardSwiperOnEnd? onEnd, CardSwiperDirection direction = CardSwiperDirection.right, bool isHorizontalSwipingEnabled = true, bool isVerticalSwipingEnabled = true, bool isLoop = true, int numberOfCardsDisplayed = 2})
const

Properties

cardBuilder NullableIndexedWidgetBuilder
widget builder for rendering cards
final
cardsCount int
cards count
final
controller CardSwiperController?
controller to trigger actions
final
direction CardSwiperDirection
direction in which the card gets swiped when triggered by controller, default set to right
final
duration Duration
duration of every animation
final
hashCode int
The hash code for this object.
no setterinherited
initialIndex int
index of the first card when the swiper is initialized
final
isDisabled bool
set to true if swiping should be disabled, exception: triggered from the outside
final
isHorizontalSwipingEnabled bool
set to false if you want your card to move only across the vertical axis when swiping
final
isLoop bool
set to true if the stack should loop
final
isVerticalSwipingEnabled bool
set to false if you want your card to move only across the horizontal axis when swiping
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxAngle double
maximum angle the card reaches while swiping
final
numberOfCardsDisplayed int
here you can change the number of cards that are displayed at the same time
final
onEnd → CardSwiperOnEnd?
function that gets called when there is no widget left to be swiped away
final
onSwipe → CardSwiperOnSwipe?
function that gets called with the new index and detected swipe direction when the user swiped or swipe is triggered by controller
final
onTapDisabled → CardSwiperOnTapDisabled?
function that gets triggered when the swiper is disabled
final
padding EdgeInsetsGeometry
padding of the swiper
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
scale of the card that is behind the front card
final
threshold int
threshold from which the card is swiped away
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