flutter_swipable_stack icon indicating copy to clipboard operation
flutter_swipable_stack copied to clipboard

How do I reset the stack?

Open dangduoc opened this issue 2 years ago • 3 comments

When users have swiped all the cards in stack, I want to let them choose to restart (swipe from the first card). controller has only one method to rewind the last action not all the way back to the first card

dangduoc avatar Sep 28 '22 11:09 dangduoc

Hello @dangduoc

The easiest way is to rebuild the widget and give it the original list that you had.

mghali1 avatar Dec 23 '22 00:12 mghali1

Hi @dangduoc I know it's too late may be you find the answer but I hope my answer should be help new developer

You need to just set on button click to set SwipableStackController index is 0

_controller.currentIndex=0;

Thanks 🙏

pnilkanth12 avatar Jun 21 '23 13:06 pnilkanth12

Hi @dangduoc I know it's too late may be you find the answer but I hope my answer should be help new developer

You need to just set on button click to set SwipableStackController index is 0

_controller.currentIndex=0;

Thanks 🙏

it's working 🙏

AhmedRazaUtor avatar Jan 02 '24 11:01 AhmedRazaUtor