Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
review fixes
  • Loading branch information
Chris Yang committed Dec 4, 2019
commit b0b69e5ff274ce6c156e3ab05502808939a38e40
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void fromBillingResult() throws JSONException {
}

@Test
public void fromBillingResult_dubugMessageNull() throws JSONException {
public void fromBillingResult_debugMessageNull() throws JSONException {
BillingResult newBillingResult =
BillingResult.newBuilder().setResponseCode(BillingClient.BillingResponseCode.OK).build();
Map<String, Object> billingResultMap = Translator.fromBillingResult(newBillingResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import 'package:json_annotation/json_annotation.dart';
part 'enum_converters.g.dart';

/// Serializer for [BillingResponse].
// Use these in `@JsonSerializable()` classes by annotating them with
// `@BillingResponseConverter()`.
///
/// Use these in `@JsonSerializable()` classes by annotating them with
/// `@BillingResponseConverter()`.
class BillingResponseConverter implements JsonConverter<BillingResponse, int> {
const BillingResponseConverter();

Expand All @@ -23,8 +24,9 @@ class BillingResponseConverter implements JsonConverter<BillingResponse, int> {
}

/// Serializer for [SkuType].
// Use these in `@JsonSerializable()` classes by annotating them with
// `@SkuTypeConverter()`.
///
/// Use these in `@JsonSerializable()` classes by annotating them with
/// `@SkuTypeConverter()`.
class SkuTypeConverter implements JsonConverter<SkuType, String> {
const SkuTypeConverter();

Expand All @@ -45,8 +47,9 @@ class _SerializedEnums {
}

/// Serializer for [PurchaseStateWrapper].
// Use these in `@JsonSerializable()` classes by annotating them with
// `@PurchaseStateConverter()`.
///
/// Use these in `@JsonSerializable()` classes by annotating them with
/// `@PurchaseStateConverter()`.
class PurchaseStateConverter
implements JsonConverter<PurchaseStateWrapper, int> {
const PurchaseStateConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class GooglePlayConnection
return _maybeAutoConsumePurchase(
PurchaseDetails.fromPurchase(purchase)..error = error);
}).toList();
if (!purchases.isEmpty) {
if (purchases.isNotEmpty) {
return Future.wait(purchases);
} else {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ abstract class InAppPurchaseConnection {
/// If the result indicates other errors, there might be some issue with
/// the app's code. The developer is responsible to fix the issue.
///
/// Warning!Failure to call this method and get a successful response within 3 days of the purchase will result a refund on Android.
/// Warning! Failure to call this method and get a successful response within 3 days of the purchase will result a refund on Android.
/// The [consumePurchase] acts as an implicit [completePurchase] on Android.
///
/// The optional parameter `developerPayload` only works on Android.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ class PurchaseDetails {
@required this.productID,
@required this.verificationData,
@required this.transactionDate,
this.skPaymentTransaction = null,
this.billingClientPurchase = null,
this.skPaymentTransaction,
this.billingClientPurchase,
});

/// Generate a [PurchaseDetails] object based on an iOS [SKTransactionWrapper] object.
Expand All @@ -194,9 +194,8 @@ class PurchaseDetails {
this.skPaymentTransaction = transaction,
this.billingClientPurchase = null,
_status = SKTransactionStatusConverter()
.toPurchaseStatus(transaction.transactionState) {
_platform = _kPlatformIOS;
}
.toPurchaseStatus(transaction.transactionState),
_platform = _kPlatformIOS;

/// Generate a [PurchaseDetails] object based on an Android [Purchase] object.
PurchaseDetails.fromPurchase(PurchaseWrapper purchase)
Expand All @@ -210,9 +209,8 @@ class PurchaseDetails {
this.skPaymentTransaction = null,
this.billingClientPurchase = purchase,
_status =
PurchaseStateConverter().toPurchaseStatus(purchase.purchaseState) {
_platform = _kPlatformAndroid;
}
PurchaseStateConverter().toPurchaseStatus(purchase.purchaseState),
_platform = _kPlatformAndroid;
}

/// The response object for fetching the past purchases.
Expand Down