CardSwiper<T extends Widget> 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})
-
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