fix(render): never hide the back card

This commit is contained in:
Ricardo Dalarme 2023-01-15 23:25:11 -03:00
parent 3be74fff19
commit 1368062e72
1 changed files with 8 additions and 11 deletions

View File

@ -260,9 +260,7 @@ class _CardSwiperState extends State<CardSwiper>
} }
Widget _backItem(BoxConstraints constraints, int index) { Widget _backItem(BoxConstraints constraints, int index) {
return Visibility( return Positioned(
visible: widget.cards.length - index <= 2,
child: Positioned(
top: _difference, top: _difference,
left: 0, left: 0,
child: Transform.scale( child: Transform.scale(
@ -272,7 +270,6 @@ class _CardSwiperState extends State<CardSwiper>
child: widget.cards[index], child: widget.cards[index],
), ),
), ),
),
); );
} }