From 1368062e72a4bed2a911949d5f604ab95eecc9e2 Mon Sep 17 00:00:00 2001 From: Ricardo Dalarme Date: Sun, 15 Jan 2023 23:25:11 -0300 Subject: [PATCH] fix(render): never hide the back card --- lib/src/card_swiper.dart | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/src/card_swiper.dart b/lib/src/card_swiper.dart index 9220e3d..30ef09e 100644 --- a/lib/src/card_swiper.dart +++ b/lib/src/card_swiper.dart @@ -260,17 +260,14 @@ class _CardSwiperState extends State } Widget _backItem(BoxConstraints constraints, int index) { - return Visibility( - visible: widget.cards.length - index <= 2, - child: Positioned( - top: _difference, - left: 0, - child: Transform.scale( - scale: _scale, - child: ConstrainedBox( - constraints: constraints, - child: widget.cards[index], - ), + return Positioned( + top: _difference, + left: 0, + child: Transform.scale( + scale: _scale, + child: ConstrainedBox( + constraints: constraints, + child: widget.cards[index], ), ), );