CardStackWidget.builder constructor

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

Create a stack of card with a specified length, via the count parameter.

To render the item, is used the builder property.

Implementation

CardStackWidget.builder({
  required int count,
  required CardStackWidgetBuilder builder,
  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,
      cardList = _getCardListFromBuilder(builder, count);