Skip to content
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

fix unmodifiable Map #130

Merged
merged 1 commit into from
Mar 25, 2021
Merged

fix unmodifiable Map #130

merged 1 commit into from
Mar 25, 2021

Conversation

josxha
Copy link
Contributor

@josxha josxha commented Mar 25, 2021

Fixes #129

@@ -91,7 +91,8 @@ class StripeApi {

/// Confirm a PaymentIntent
/// https://stripe.com/docs/api/payment_intents/confirm
Future<Map<String, dynamic>> confirmPaymentIntent(String clientSecret, {Map<String, dynamic> data = const {}}) async {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be enough to just remove the const modifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was what I originally wanted to write, but was not possible.
error: The default value of an optional parameter must be constant. (non_constant_default_value at [stripe_sdk] lib\src\stripe_api.dart:113)

@francislions
Copy link

francislions commented Mar 25, 2021

I tried the fix editing the stripe_sdk in pub-cache and it works for the method confirmSetupIntent! 👍🏻

@ezet ezet merged commit d310e79 into ezet:master Mar 25, 2021
@ezet
Copy link
Owner

ezet commented Mar 25, 2021

@francislions I won't release another version to pub yet, so I suggest you pull the library from git for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Method confirmSetupIntent of StripeApi throws UnsupportedError (ver. 5.0.0-nullsafety.0)
3 participants