DDSSwipableCard constructor

const DDSSwipableCard({
  1. Key? key,
  2. required List<Widget> cardDeck,
  3. double cardWidth = 300.0,
  4. VoidCallback? onDeckEmpty,
  5. void onSwipe(
    1. int index,
    2. Widget card,
    3. CardSwiperDirection direction
    )?,
  6. int initialIndex = 0,
  7. CardSwiperController? controller,
  8. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
  9. Duration duration = const Duration(milliseconds: 200),
  10. double maxAngle = 30,
  11. int threshold = 50,
  12. double scale = 0.9,
  13. bool isDisabled = false,
  14. CardSwiperOnTapDisabled? onTapDisabled,
  15. CardSwiperOnEnd? onEnd,
  16. CardSwiperDirectionChange? onSwipeDirectionChange,
  17. AllowedSwipeDirection allowedSwipeDirection = const AllowedSwipeDirection.all(),
  18. bool isLoop = true,
  19. int numberOfCardsDisplayed = 2,
  20. CardSwiperOnUndo? onUndo,
  21. 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);