StoreProduct constructor
const
StoreProduct(
- String identifier,
- String description,
- String title,
- double price,
- String priceString,
- String currencyCode, {
- @JsonKey(name: 'introPrice') IntroductoryPrice? introductoryPrice,
- List<
StoreProductDiscount> ? discounts, - ProductCategory? productCategory,
- SubscriptionOption? defaultOption,
- List<
SubscriptionOption> ? subscriptionOptions, - PresentedOfferingContext? presentedOfferingContext,
- String? subscriptionPeriod,
Implementation
const factory StoreProduct(
/// Product Id.
String identifier,
/// Description of the product.
String description,
/// Title of the product.
String title,
/// Price of the product in the local currency.
double price,
/// Formatted price of the item, including its currency sign.
String priceString,
/// Currency code for price and original price.
String currencyCode, {
/// Introductory price for product. Can be null.
// ignore: invalid_annotation_target
@JsonKey(name: 'introPrice') IntroductoryPrice? introductoryPrice,
/// Collection of discount offers for a product. Null for Android.
List<StoreProductDiscount>? discounts,
/// Product category.
ProductCategory? productCategory,
/// Default subscription option for a product. Google Play only.
SubscriptionOption? defaultOption,
/// Collection of subscription options for a product. Google Play only.
List<SubscriptionOption>? subscriptionOptions,
/// Offering context this package belongs to.
/// Null if not using offerings or if fetched directly from store via getProducts
PresentedOfferingContext? presentedOfferingContext,
/// 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.
String? subscriptionPeriod,
}) = _StoreProduct;