Package constructor

const Package(
  1. String identifier,
  2. @JsonKey(name: 'packageType', unknownEnumValue: PackageType.unknown) PackageType packageType,
  3. @JsonKey(name: 'product') StoreProduct storeProduct,
  4. String offeringIdentifier,
)

Implementation

const factory Package(
  /// Unique identifier for this package. Can be one a predefined package type
  /// or a custom one.
  String identifier,

  /// Package type for the product. Will be one of [PackageType].
  // ignore: invalid_annotation_target
  @JsonKey(
    name: 'packageType',
    unknownEnumValue: PackageType.unknown,
  )
      PackageType packageType,

  /// StoreProduct assigned to this package.
  // ignore: invalid_annotation_target
  @JsonKey(name: 'product')
      StoreProduct storeProduct,

  /// Offering this package belongs to.
  String offeringIdentifier,
) = _Package;