DDSSwipableCard constructor
const
DDSSwipableCard({
- Key? key,
- required List<
Widget> cardDeck, - double cardWidth = 300.0,
- VoidCallback? onDeckEmpty,
- void onSwipe()?,
- int initialIndex = 0,
- CardSwiperController? controller,
- 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,
- CardSwiperOnEnd? onEnd,
- CardSwiperDirectionChange? onSwipeDirectionChange,
- AllowedSwipeDirection allowedSwipeDirection = const AllowedSwipeDirection.all(),
- bool isLoop = true,
- int numberOfCardsDisplayed = 2,
- CardSwiperOnUndo? onUndo,
- Offset backCardOffset = const Offset(0, 40),
Implementation
const DDSSwipableCard({
Key? key,
required this.cardDeck,
this.cardWidth = 300.0,
this.onDeckEmpty,
this.onSwipe,
this.initialIndex = 0,
this.controller,
this.padding = const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
this.duration = const Duration(milliseconds: 200),
this.maxAngle = 30,
this.threshold = 50,
this.scale = 0.9,
this.isDisabled = false,
this.onTapDisabled,
this.onEnd,
this.onSwipeDirectionChange,
this.allowedSwipeDirection = const AllowedSwipeDirection.all(),
this.isLoop = true,
this.numberOfCardsDisplayed = 2,
this.onUndo,
this.backCardOffset = const Offset(0, 40),
}) : super(key: key);