StoreProduct constructor

const StoreProduct(
  1. @JsonKey(name: 'identifier') String identifier,
  2. @JsonKey(name: 'description') String description,
  3. @JsonKey(name: 'title') String title,
  4. @JsonKey(name: 'price') double price,
  5. @JsonKey(name: 'priceString') String priceString,
  6. @JsonKey(name: 'currencyCode') String currencyCode, {
  7. @JsonKey(name: 'introPrice') IntroductoryPrice? introductoryPrice,
  8. @JsonKey(name: 'discounts') List<StoreProductDiscount>? discounts,
  9. @JsonKey(name: 'subscriptionPeriod') String? subscriptionPeriod,
})

Implementation

const factory StoreProduct(
  /// Product Id.
  @JsonKey(name: 'identifier') String identifier,

  /// Description of the product.
  @JsonKey(name: 'description') String description,

  /// Title of the product.
  @JsonKey(name: 'title') String title,

  /// Price of the product in the local currency.
  @JsonKey(name: 'price') double price,

  /// Formatted price of the item, including its currency sign.
  @JsonKey(name: 'priceString') String priceString,

  /// Currency code for price and original price.
  @JsonKey(name: 'currencyCode') String currencyCode, {

  /// Introductory price for product. Can be null.
  @JsonKey(name: 'introPrice')
      IntroductoryPrice? introductoryPrice,

  /// Collection of discount offers for a product. Null for Android.
  @JsonKey(name: 'discounts')
      List<StoreProductDiscount>? discounts,

  /// Subscription period, specified in ISO 8601 format. For example,
  /// P1W equates to one week, P1M equates to one month,
  /// P3M equates to three months, P6M equates to six months,
  /// and P1Y equates to one year.
  /// Note: Not available for Amazon.
  @JsonKey(name: 'subscriptionPeriod')
      String? subscriptionPeriod,
}) = _StoreProduct;