From 7fdcb099d9fd0c8f2fdbfe3bb293ff1e62a24b8e Mon Sep 17 00:00:00 2001 From: Ricardo Dalarme Date: Tue, 21 Feb 2023 20:51:34 -0300 Subject: [PATCH] fix(stack): use the stack to render the items --- lib/src/card_swiper.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/card_swiper.dart b/lib/src/card_swiper.dart index 6736980..d6f41ba 100644 --- a/lib/src/card_swiper.dart +++ b/lib/src/card_swiper.dart @@ -173,7 +173,7 @@ class _CardSwiperState extends State> angle: _angle, child: ConstrainedBox( constraints: constraints, - child: widget.cards[_currentIndex], + child: _stack[_currentIndex], ), ), onTap: () { @@ -226,7 +226,7 @@ class _CardSwiperState extends State> constraints: constraints, child: _stack.length <= 1 ? widget.cards.last - : widget.cards[_currentIndex - 1], + : _stack[_currentIndex - 1], ), ), );