-
Notifications
You must be signed in to change notification settings - Fork 132
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
method never returns if showPaymentSelector was canceled by pressing back button #61
Comments
Hi @vanomak, that's indeed not communicated back to the Dart end at the moment. Is that something you'd find useful? What's the use case you have? It fees to me that, at the very least, the call should return in every scenario, to allow the execution to continue. |
@JlUgia here is my scenario:
|
Thank you for sharing this @vanomak.
I'm personally navigating between the first and second options, that although not being entirely appropriate, they keep the API simple, solving for a problem and flow that is at the same not complex nor too frequent. What do you think? /cc @socsieng @jamesblasco @domesticmouse @Arkangel12 for additional thoughts. |
@JlUgia The second option (return null or empty) might be misleading. My hotfix is here |
We are facing this issue as well. I don't see how we can show an error, or cancel our loading state, if the user goes back from showPaymentSelector. We receive nothing. The result isn't even null. Is there a workaround for this? |
Same here, as far as I remember paying with apple will throw a Update: It will sometimes throw a PlatformException. |
Exceptions are for exceptional cases, right? Like errors. Flutter's |
Thank you for the thoughts @kristoffer-zliide. I generally agree with that rationale. Thank you for the contributions and thoughts and feel free to suggest additional ideas. |
The PR has been merged and a new version is out. Take a look at 1.0.6. |
In case of exceptions you generally need to 1) inform the user that something has gone wrong, and 2) report the error back to the development team for further investigation. When the user cancels the payment you need to do neither of those. So throwing the cancel scenario in with the error scenarios just complicates the handling of those cases. |
showPaymentSelector starts payment flow, if user click back button at this stage no return occurs
how to detect this situation?
The text was updated successfully, but these errors were encountered: