Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions that make the cards animate left or right. #9

Closed
yushinzm opened this issue Jul 30, 2020 · 2 comments
Closed

Functions that make the cards animate left or right. #9

yushinzm opened this issue Jul 30, 2020 · 2 comments

Comments

@yushinzm
Copy link

Another addition would be adding two functions that drag/animate the cards left or right. An example would be how tinder functions when you like someone the card goes right and when you dislike the card goes left. managed to get this by modifying your code a bit and reversing the forward and back functions animations.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@xrr2016
Copy link
Collaborator

xrr2016 commented Jul 30, 2020

Another addition would be adding two functions that drag/animate the cards left or right. An example would be how tinder functions when you like someone the card goes right and when you dislike the card goes left. managed to get this by modifying your code a bit and reversing the forward and back functions animations.

You can use controller's forward method and pass the SwipDirection argument to achieve this. Check here use-a-controller-to-control

And the source code
https://github.com/xrr2016/tcard/blob/63a3f552d1a5daa94e2d2760d5cc9bcb5074dcdb/lib/src/cards.dart#L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants