-
Notifications
You must be signed in to change notification settings - Fork 117
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
How to trigger swipe with buttons? #10
Comments
Hej dude ! If you have found the solution i'll be glad to be aware because i'm a bit lost right now ! |
You can trigger a swipe animation from a button by manually moving the front card's alignment past it's treshold and then triggering the animateCards method. example:
|
hi men ! thanks for the answer, but where is the animateCards method ? |
you should be able to find the |
I curious about how could we call the method I'm a Flutter beginner, sorry for that if I asked a silly question. |
Take no notice, he is having you on and causing you more headache with that answer. User streams is the correct way. Will post you a solution in a moment. really annoys me when people make off cuff replies which confuse people even more. |
In your main set a stream
Now in your swipe_feed_page.dart call the stream
You will also have to import your main.dart Now change the buttons to this
In code_section_alignment.dart reference the stream
Now in the init state of the same file add this
Now also in the same file add these functions
Build and press like or "hate" |
May want to also put a delay for those with frisky thumbs also |
Newbie question how do one trigger the swipe and the animation when like button pressed?
The text was updated successfully, but these errors were encountered: