Product class

Annotations
  • @freezed
  • @JsonSerializable(createFactory: false)

Constructors

Product({required String title, required String id, required bool availableForSale, required String createdAt, required List<ProductVariant> productVariants, required String productType, required String publishedAt, required List<String> tags, required String updatedAt, required List<ShopifyImage> images, required List<Option> options, required String vendor, required List<ProductMedia> media, List<AssociatedCollections>? collectionList, String? cursor, String? onlineStoreUrl, String? description, String? descriptionHtml, String? handle})
factory
Product.fromGraphJson(Map<String, dynamic> json)
factory
Product.fromJson(Map<String, dynamic> json)
factory

Properties

availableForSale bool
no setterinherited
collectionList List<AssociatedCollections>?
no setterinherited
compareAtPrice double
no setter
compareAtPriceFormatted String
no setter
copyWith → $ProductCopyWith<Product>
no setterinherited
createdAt String
no setterinherited
currencyCode String
no setter
cursor String?
no setterinherited
description String?
no setterinherited
descriptionHtml String?
no setterinherited
formattedPrice String
no setter
handle String?
no setterinherited
hasComparablePrice bool
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
image String
no setter
images List<ShopifyImage>
no setterinherited
isAvailableForSale bool
Checks if the product is available for sale by checking its variants availability and quantity
no setter
media List<ProductMedia>
no setterinherited
onlineStoreUrl String?
no setterinherited
options List<Option>
no setterinherited
price double
no setter
productType String
no setterinherited
productVariants List<ProductVariant>
no setterinherited
publishedAt String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<String>
no setterinherited
title String
no setterinherited
updatedAt String
no setterinherited
vendor String
no setterinherited

Methods

compareAtPriceFormattedWithLocale(String? locale) String
formattedPriceWithLocale(String? locale) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited