You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are minor improvements that don't warrant their own Github issue, but that would make this package align more with the rest of the Dart ecosystem.
Please don't waste your time on these, the other issues are way more important.
Hide constructor
Chargebee() shouldn't be accessible, since everything is static anyway.
You can hide the constructor via
classChargebee {
Chargebee._();
...
Override toString() to make objects easily loggable:
final result =awaitChargebee.purchaseProduct(...);
print(result);
logToCrashlytics(result.toString());
Use named parameters for the methods:
awaitChargebee.configure("...", "...", "...", "..."); // <-- which of these is the android sdk key?awaitconfigure(
site:"...",
apiKey:"...",
androidSdkKey:"...", // <-- this can be removed without potentially passing null in a random place in the arglist
iosSdkKey:"...",
);
PurchaseResult.status should be an enum:
Yes, you can google and search for valid values in the website documentation, but its faster to have your code editor autocomplete everything or at least spit out the inline documentation (which is also missing: #37).
The text was updated successfully, but these errors were encountered:
ciriousjoker
added a commit
to dieringe/chargebee-flutter
that referenced
this issue
Jan 22, 2023
Here are minor improvements that don't warrant their own Github issue, but that would make this package align more with the rest of the Dart ecosystem.
Please don't waste your time on these, the other issues are way more important.
Hide constructor
Chargebee()
shouldn't be accessible, since everything is static anyway.You can hide the constructor via
Override toString() to make objects easily loggable:
Use named parameters for the methods:
PurchaseResult.status should be an enum:
Yes, you can google and search for valid values in the website documentation, but its faster to have your code editor autocomplete everything or at least spit out the inline documentation (which is also missing: #37).
The text was updated successfully, but these errors were encountered: