Closed ihorbokov closed 2 years ago
This PR looks great, thank you for contributing! Before I merge the PR, do you have steps to recreate the original issue? I'd like to write a regression test for this issue if possible.
Sure, for recreate the original issue you can use your example from pub.dev, after you've compiled the example try to swipe a few cards and go ahead and do 'hot restart' and after this swipe a card again, in this case you should see this error - Unhandled Exception: LateInitializationError: Field 'swipeController' has not been initialized.
.
I was able to recreate the original issue and your solution works great, thank you again for contributing! 🎉
There is a problem when SwipingGestureDetector widget recreating and in this time
late final AnimationController swipeController;
is lost becausevoid initState()
is called only one time.