StoreProduct constructor
const
StoreProduct(
- @JsonKey(name: 'identifier') String identifier,
- @JsonKey(name: 'description') String description,
- @JsonKey(name: 'title') String title,
- @JsonKey(name: 'price') double price,
- @JsonKey(name: 'priceString') String priceString,
- @JsonKey(name: 'currencyCode') String currencyCode, {
- @JsonKey(name: 'introPrice') IntroductoryPrice? introductoryPrice,
- @JsonKey(name: 'discounts') List<
StoreProductDiscount> ? discounts, - @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;