CardStackWidget constructor

const CardStackWidget({
  1. required List<CardModel> cardList,
  2. Key? key,
  3. double? positionFactor,
  4. double? scaleFactor,
  5. CardOrientation? cardDismissOrientation,
  6. CardOrientation? swipeOrientation,
  7. Alignment? alignment,
  8. bool reverseOrder = false,
  9. dynamic onCardTap(
    1. CardModel
    )?,
  10. bool opacityChangeOnDrag = false,
  11. bool animateCardScale = false,
  12. Duration? dismissedCardDuration,
})

Create a stack of card using the CardModel properties inside the cardList parameter.

Implementation

const CardStackWidget({
  required this.cardList,
  super.key,
  double? positionFactor,
  double? scaleFactor,
  CardOrientation? cardDismissOrientation,
  CardOrientation? swipeOrientation,
  this.alignment,
  this.reverseOrder = false,
  this.onCardTap,
  this.opacityChangeOnDrag = false,
  this.animateCardScale = false,
  this.dismissedCardDuration,
})  : scaleFactor = scaleFactor ?? scaleFactorDefault,
      positionFactor = positionFactor ?? positionFactorDefault,
      cardDismissOrientation = cardDismissOrientation ?? CardOrientation.both,
      swipeOrientation = swipeOrientation ?? CardOrientation.both;