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

Plugin throws exceptions with flutter v1.10.7 beta #116

Closed
Jon-Salmon opened this issue Oct 22, 2019 · 3 comments
Closed

Plugin throws exceptions with flutter v1.10.7 beta #116

Jon-Salmon opened this issue Oct 22, 2019 · 3 comments

Comments

@Jon-Salmon
Copy link
Contributor

On the latest beta version of flutter, dart errors are thrown when a purchase is requested.

I believe this may be due to this dart change with how Future<Null> is interpreted:
dart-lang/sdk#37985

E/flutter (13113): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'String' is not a subtype of type 'Null'
E/flutter (13113): #0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:13)
E/flutter (13113): <asynchronous suspension>
E/flutter (13113): #1      FlutterInappPurchase.requestPurchase (package:flutter_inapp_purchase/flutter_inapp_purchase.dart:229:29)
E/flutter (13113): <asynchronous suspension>
@hyochan
Copy link
Owner

hyochan commented Oct 28, 2019

Do you think you can help out giving any other PR?

@Jon-Salmon
Copy link
Contributor Author

What was the motivation for some of the methods to return Future<Null> instead of Future? I believe this is the only change that is required.

@Jon-Salmon
Copy link
Contributor Author

I have created pull request #117 which I believe fixes this issue.

Please test it however as I have only performed basic tests.

hyochan pushed a commit that referenced this issue Mar 3, 2020
…165)

* #116 changed Future<Null> to Future due to dart sdk change

* Make amazon purchase trigger callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants