SwipeableCardsSection constructor
SwipeableCardsSection({
- Key? key,
- SwipeableCardSectionController? cardController,
- required BuildContext context,
- required List<
Widget> items, - Function? onCardSwiped,
- double cardWidthTopMul = 0.9,
- double cardWidthMiddleMul = 0.85,
- double cardWidthBottomMul = 0.8,
- double cardHeightTopMul = 0.6,
- double cardHeightMiddleMul = 0.55,
- double cardHeightBottomMul = 0.5,
- Function? appendItemCallback,
- bool enableSwipeUp = true,
- bool enableSwipeDown = true,
Implementation
SwipeableCardsSection({
Key? key,
this.cardController,
required BuildContext context,
required this.items,
this.onCardSwiped,
this.cardWidthTopMul = 0.9,
this.cardWidthMiddleMul = 0.85,
this.cardWidthBottomMul = 0.8,
this.cardHeightTopMul = 0.6,
this.cardHeightMiddleMul = 0.55,
this.cardHeightBottomMul = 0.5,
this.appendItemCallback,
this.enableSwipeUp = true,
this.enableSwipeDown = true,
}) {
cardsSize[0] = Size(MediaQuery.of(context).size.width * cardWidthTopMul,
MediaQuery.of(context).size.height * cardHeightTopMul);
cardsSize[1] = Size(MediaQuery.of(context).size.width * cardWidthMiddleMul,
MediaQuery.of(context).size.height * cardHeightMiddleMul);
cardsSize[2] = Size(MediaQuery.of(context).size.width * cardWidthBottomMul,
MediaQuery.of(context).size.height * cardHeightBottomMul);
}