PurchasesError constructor

const PurchasesError(
  1. @PurchasesErrorCodeConverter() PurchasesErrorCode code,
  2. String message,
  3. String underlyingErrorMessage,
  4. @JsonKey(defaultValue: '') String readableErrorCode,
)

Implementation

const factory PurchasesError(
  @PurchasesErrorCodeConverter() PurchasesErrorCode code,
  String message,
  String underlyingErrorMessage,
  // iOS can return a readable error code null, because the construction
  // of the error doesn't prevent it from being null. To be safe we default
  // it to '' instead of making it nullable
  // ignore: invalid_annotation_target
  @JsonKey(defaultValue: '') String readableErrorCode,
) = _PurchasesError;