SwipingDeck<T extends Widget> constructor
SwipingDeck<T extends Widget> ({
- Key? key,
- required List<
T> cardDeck, - required dynamic onLeftSwipe(
- T
- required dynamic onRightSwipe(
- T
- required dynamic onDeckEmpty(),
- required double cardWidth,
- double minimumVelocity = 1000,
- double rotationFactor = .8 / 3.14,
- double? swipeThreshold,
- Duration swipeAnimationDuration = const Duration(milliseconds: 500),
- 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();
}