Open Teomayo opened 2 years ago
Maybe this could be exposed as an additional option in the SwipingGestureDetector
class specifically within the GestureDetector
. My workaround would probably require using the gesture detector class wrapped around my image, which unfortunately conflicts with the detection within the SwipingDeck
class.
Hi @Teomayo, thank you for opening this issue, apologies for the delayed response! I've actually been thinking about solutions to this since you asked. My first suggestion is to try using a Stack
widget with your text overlayed on top of the SwipingCardDeck
widget, although I'm going to look into this myself to make sure the gesture detector still works in a Stack
. Your idea is also worth investigating and something I've considered before, so I'll do some research and revisit the idea. In the meantime, feel free to open a pull request with any changes that make this work for you (there's some pull request tips and guidance in CONTRIBUTING.md). Thanks again for contributing, I'll try to get this issue resolved as soon as possible!
@jushutch I would suggest you expose a listener when the card starts moving, with threshold markers.
We can then note when the card reaches a certain threshold and display our content (text, icon, etc)
I think this is what Bumble are doing.
When user moves the card, before it is released, an icon displays as an overlay, on the stack.
Thanks and awesome job!!!
Before posting your question :heavy_check_mark:
Question: Is there a simple way to have text display while swiping on top of the card being swiped?
Hey, I was wondering if there is a simple way to have text display while swiping on top of the card being swiped? I am newer to flutter and it seems like this could be possible using the onLeftSwipe/onRightSwipe functions and using callbacks but I am wondering if this would only display on swipe completion and wouldn't allow for rendering of text or image during the swipe action. If you have any thoughts on this it would be greatly appreciated. Love the package compared to some of the other swiping stack options!