CardSwiper class
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 , CardSwiperOnUndo? onUndo })
const
Properties
cardBuilder
→ NullableIndexedWidgetBuilder
Function that builds each card in the stack.
final
cardsCount
→ int
The number of cards in the stack.
final
controller
→ CardSwiperController ?
The CardSwiperController used to control the swiper externally.
final
direction
→ CardSwiperDirection
The direction in which the card is swiped when triggered by the controller .
final
duration
→ Duration
The duration of each swipe animation.
final
hashCode
→ int
The hash code for this object.
no setter inherited
initialIndex
→ int
The index of the card to display initially.
final
isDisabled
→ bool
Whether swiping is disabled.
final
isHorizontalSwipingEnabled
→ bool
A boolean value that determines whether the card can be swiped horizontally. The default value is true.
final
isLoop
→ bool
A boolean value that determines whether the card stack should loop. When the last card is swiped,
if isLoop is true, the first card will become the last card again. The default value is true.
final
isVerticalSwipingEnabled
→ bool
A boolean value that determines whether the card can be swiped vertically. The default value is true.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
maxAngle
→ double
The maximum angle the card reaches while swiping.
final
numberOfCardsDisplayed
→ int
An integer that determines the number of cards that are displayed at the same time.
The default value is 2. Note that you must display at least one card, and no more than the cardsCount parameter.
final
onEnd
→ CardSwiperOnEnd?
Callback function that is called when there are no more cards to swipe.
final
onSwipe
→ CardSwiperOnSwipe?
Callback function that is called when a swipe action is performed.
final
onTapDisabled
→ CardSwiperOnTapDisabled?
Callback function that is called when the swiper is disabled.
final
onUndo
→ CardSwiperOnUndo?
Callback function that is called when a card is unswiped.
final
padding
→ EdgeInsetsGeometry
The padding around the swiper.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
scale
→ double
The scale of the card that is behind the front card.
final
threshold
→ int
The threshold from which the card is swiped away.
final
flutter_card_swiper 4.1.3