Closed maeddin closed 2 years ago
@MaddinMade Thanks for making this PR!
I think I'm imagining the situation you describe, but it would be helpful you could provide an example because there may be a discrepancy.
@HeavenOSK I have created a small example to demonstrate the use case. For this I have simply built a list into the cards, which here consists only of the same sample images as in the other examples. It's not easy to see, but makes a difference in practice, in my opinion. The GIFs are in slow motion.
Here you can see the swipe start with animation:
And here once without:
@MaddinMade Thanks for providing the example! I understand your intent 🙏
Nice approach! This PR should be merged before upgrading to Flutter V3.
@HeavenOSK There is only line of code that generates a warning in Flutter 3. This is not a big deal. Should I include that with this pull request?
@HeavenOSK I've added two comments as explanation 😁
@HeavenOSK Should I add the Flutter 3 upgrade as well? Is only one line.
@MaddinMade Thanks adding ! 🙏 I'll merge this PR.
Sorry for the very late response.
Should I add the Flutter 3 upgrade as well? Is only one line.
No you shouldn't! I'll do it. Thank you!
Normally it doesn't make much difference if you choose
Dragstartbehavior.down
orDragstartbehavior.start
with this package. This changes if you use e.g. a list in the cards. Then the swipe gesture must first win in the gesture arena, makingDragstartbehavior.down
more reactive. However, the animation is not so smooth in this case, which is why I added an animation for these cases. I can also add an example if desired. This animation is not executed if the default value (Dragstartbehavior.start
) is chosen.