-
Notifications
You must be signed in to change notification settings - Fork 290
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
[UMP] Convert to Future-based API instead of callbacks #852
Comments
We’re closing this issue due to inactivity. If you’re still impacted, please create a new issue via the Developer Forum. |
@huycozy Can this issue be re-opened? I created a post on the forum on July 21st and haven't gotten a response, and my other feature request issue is open. |
Yes. Re-opening the issue for further updates. |
@Reprevise take a look at #852 and feel free to leave any comments |
I'd love to see an update to the |
Use case
Currently, I'm using
Completer
s to get close to resembling a Future-based API but this should really be converted to using Futures. Success/failure callbacks are very java-y and don't work well in Dart.Proposal
A new package hit stable called flutter_funding_choices and I believe great inspiration can be taken from that.
ConsentForm#loadConsentForm
return type should be aFuture<ConsentForm>
which throws an error. I understand the attempt to force the user to handle the FormError but I believe this is more of a language problem and not having aResult
type class to handle success/error states.ConsentInformation#requestConsentInfoUpdate
return type should beFuture<ConsentStatus>
and should throw an exception (maybe a GoogleMobileAds specific exception like a newGoogleMobileAdsException
class?).ConsentForm#show
should drop theonConsentFormDismissedListener
param as well, and should just throw an exception. If you want users to be able to wait for the form to be dismissed, perhaps make it aFuture<void>
return type.The text was updated successfully, but these errors were encountered: