SwipingDeck<T extends Widget> constructor

SwipingDeck<T extends Widget>({
  1. Key? key,
  2. required List<T> cardDeck,
  3. required dynamic onLeftSwipe(
    1. T
    ),
  4. required dynamic onRightSwipe(
    1. T
    ),
  5. required dynamic onDeckEmpty(),
  6. required double cardWidth,
  7. double minimumVelocity = 1000,
  8. double rotationFactor = .8 / 3.14,
  9. double? swipeThreshold,
  10. Duration swipeAnimationDuration = const Duration(milliseconds: 500),
  11. bool disableDragging = false,
})

Implementation

SwipingDeck(
    {Key? key,
    required this.cardDeck,
    required this.onLeftSwipe,
    required this.onRightSwipe,
    required this.onDeckEmpty,
    required this.cardWidth,
    this.minimumVelocity = 1000,
    this.rotationFactor = .8 / 3.14,
    this.swipeThreshold,
    this.swipeAnimationDuration = const Duration(milliseconds: 500),
    this.disableDragging = false})
    : super(key: key) {
  cardDeck = cardDeck.reversed.toList();
}