fix(stack): use the stack to render the items
This commit is contained in:
parent
6aa09f71dd
commit
7fdcb099d9
|
|
@ -173,7 +173,7 @@ class _CardSwiperState<T extends Widget> extends State<CardSwiper<T>>
|
||||||
angle: _angle,
|
angle: _angle,
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: constraints,
|
constraints: constraints,
|
||||||
child: widget.cards[_currentIndex],
|
child: _stack[_currentIndex],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -226,7 +226,7 @@ class _CardSwiperState<T extends Widget> extends State<CardSwiper<T>>
|
||||||
constraints: constraints,
|
constraints: constraints,
|
||||||
child: _stack.length <= 1
|
child: _stack.length <= 1
|
||||||
? widget.cards.last
|
? widget.cards.last
|
||||||
: widget.cards[_currentIndex - 1],
|
: _stack[_currentIndex - 1],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue