tinder_cards
tinder_cards copied to clipboard
Gesture Method: Stack refreshing back to the initial state after a valid swipe; cards[] modifying correctly
Hi @lvaskuu,
I'm using gesture method, code is pretty much the same as your gesture method code. After a "valid" swipe, for a moment the second card comes up and the card on the top of the stack disappears, but then the entire stack reverts back to the original state.
Observations on debugging: The changeCardsOrder() seems to be working fine, as the data in the cards[] is modified correctly as seen upon debugging. The stack is being built (through setState) with the correct cards[] too. Yet, the screen shows the originally loaded stack after a sec.
Any suggestions on what might be going wrong? Maybe you came across something like this while developing. Can paste in the code if you want.
Pls check https://stackoverflow.com/questions/52391312/flutter-implementing-tinder-like-swiping-after-a-successful-swipe-stack-imme for code