tinder_cards icon indicating copy to clipboard operation
tinder_cards copied to clipboard

Gesture Method: Stack refreshing back to the initial state after a valid swipe; cards[] modifying correctly

Open pravaibh opened this issue 6 years ago • 1 comments

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.

pravaibh avatar Sep 18 '18 13:09 pravaibh

Pls check https://stackoverflow.com/questions/52391312/flutter-implementing-tinder-like-swiping-after-a-successful-swipe-stack-imme for code

pravaibh avatar Sep 19 '18 06:09 pravaibh