-
Notifications
You must be signed in to change notification settings - Fork 169
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
Release 1.2.0 #76
Release 1.2.0 #76
Conversation
@aboedo bump |
@vegaro sorry I'd missed this! reviewing |
static PurchasesErrorCode getErrorCode(PlatformException e) { | ||
return PurchasesErrorCode.values[int.parse(e.code)]; | ||
var errorCode = int.parse(e.code); | ||
if (errorCode >= PurchasesErrorCode.values.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is good, although it serves as a good reminder that we'll have to be more careful regarding keeping the codes in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I wonder if we could break the compilation somehow, or maybe add a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking about that same thing for the swift enum in purchases-ios. a test might be the way to go, even if it only covers that the number of possible values is the same on both sides
lib/errors.dart
Outdated
/// if (errorCode == PurchasesErrorCode.purchaseCancelledError) { | ||
/// print("User cancelled"); | ||
/// } else if (errorCode == PurchasesErrorCode.purchaseNotAllowedError) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: would a switch be more suitable?
setProxyURL
(bump native sdks #63)setFinishTransactions
(Exposes finishTransactions to flutter code #45)