Product class
Contains all the product details associated with a Store product id
- Annotations
-
- @freezed
Constructors
-
Product(@JsonKey(name: 'identifier') String identifier, @JsonKey(name: 'description') String description, @JsonKey(name: 'title') String title, @JsonKey(name: 'price') double price, @JsonKey(name: 'price_string') String priceString, @JsonKey(name: 'currency_code') String currencyCode, {@JsonKey(name: 'introPrice', nullable: true) IntroductoryPrice? introductoryPrice, @JsonKey(name: 'discounts', nullable: true) List<
Discount> ? discounts}) -
constfactory
-
Product.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ $ProductCopyWith<
Product> -
no setterinherited
- currencyCode → String
-
Currency code for price and original price.
no setterinherited
- description → String
-
Description of the product.
no setterinherited
-
discounts
→ List<
Discount> ? -
Collection of discount offers for a product. Null for Android.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
Product Id.
no setterinherited
- introductoryPrice → IntroductoryPrice?
-
Introductory price for product. Can be null.
no setterinherited
- price → double
-
Price of the product in the local currency.
no setterinherited
- priceString → String
-
Formatted price of the item, including its currency sign.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
Title of the product.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited