Product class

Constructors

Product({int? id, String? name, String? slug, String? permalink, String? dateCreated, String? dateCreatedGmt, String? dateModified, String? dateModifiedGmt, String? type, String? status, bool? featured, String? catalogVisibility, String? description, String? shortDescription, String? sku, String? price, String? regularPrice, String? salePrice, String? dateOnSaleFrom, String? dateOnSaleFromGmt, String? dateOnSaleTo, String? dateOnSaleToGmt, String? priceHtml, bool? onSale, bool? purchasable, int? totalSales, bool? virtual, bool? downloadable, List<ProductDownloads>? downloads, int? downloadLimit, int? downloadExpiry, String? externalUrl, String? buttondText, String? taxStatus, String? taxClass, bool? manageStock, int? stockQuantity, String? stockStatus, String? backorders, bool? backordersAllowed, bool? backordered, bool? soldIndividually, String? weight, ProductDimensions? dimensions, bool? shippingdRequired, bool? shippingdTaxable, String? shippingClass, int? shippingClassId, bool? reviewsAllowed, String? averagedRating, int? ratingCount, List<int>? relatedIds, List<int>? upsellIds, List<int>? crossSellIds, int? parentId, String? purchaseNote, List<ProductCategory>? categories, List<ProductTag>? tags, List<ProductImage>? images, List<ProductAttributes>? attributes, List<ProductDefaultAttributes>? defaultAttributes, List<int>? variations, List<Product>? groupedProducts, int? menuOrder, List<ProductMeta>? metaData})
Product.fromJson(String source)
factory
Product.fromMap(Map<String, dynamic> map)
factory

Properties

attributes List<ProductAttributes>?
final
averagedRating String?
final
backordered bool?
final
backorders String?
String If managing stock, this controls if backorders are allowed.
final
backordersAllowed bool?
final
buttondText String?
final
catalogVisibility String?
final
categories List<ProductCategory>?
final
crossSellIds List<int>?
final
dateCreated String?
final
dateCreatedGmt String?
final
dateModified String?
final
dateModifiedGmt String?
final
dateOnSaleFrom String?
final
dateOnSaleFromGmt String?
final
dateOnSaleTo String?
final
dateOnSaleToGmt String?
final
defaultAttributes List<ProductDefaultAttributes>?
final
description String?
final
dimensions → ProductDimensions?
final
downloadable bool?
bool If the variation is downloadable.
final
downloadExpiry int?
final
downloadLimit int?
final
downloads List<ProductDownloads>?
final
externalUrl String?
final
final
groupedProducts List<Product>?
final
hashCode int
The hash code for this object.
no setteroverride
id int?
final
images List<ProductImage>?
final
manageStock bool?
bool Stock management at variation level.
final
final
metaData List<ProductMeta>?
final
name String?
final
onSale bool?
final
parentId int?
final
final
price String?
final
priceHtml String?
final
purchasable bool?
final
purchaseNote String?
final
ratingCount int?
final
regularPrice String?
final
relatedIds List<int>?
final
reviewsAllowed bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
salePrice String?
final
shippingClass String?
final
shippingClassId int?
final
shippingdRequired bool?
final
shippingdTaxable bool?
final
shortDescription String?
final
sku String?
final
slug String?
final
soldIndividually bool?
final
status String?
String Variation status.
final
stockQuantity int?
final
stockStatus String?
String Controls the stock status of the product.
final
tags List<ProductTag>?
final
taxClass String?
final
taxStatus String?
String Tax status.
final
totalSales int?
final
type String?
final
upsellIds List<int>?
final
variations List<int>?
final
virtual bool?
bool If the variation is virtual.
final
weight String?
final

Methods

copyWith({int? id, String? name, String? slug, String? permalink, String? dateCreated, String? dateCreatedGmt, String? dateModified, String? dateModifiedGmt, String? type, String? status, bool? featured, String? catalogVisibility, String? description, String? shortDescription, String? sku, String? price, String? regularPrice, String? salePrice, String? dateOnSaleFrom, String? dateOnSaleFromGmt, String? dateOnSaleTo, String? dateOnSaleToGmt, String? priceHtml, bool? onSale, bool? purchasable, int? totalSales, bool? virtual, bool? downloadable, List<ProductDownloads>? downloads, int? downloadLimit, int? downloadExpiry, String? externalUrl, String? buttondText, String? taxStatus, String? taxClass, bool? manageStock, int? stockQuantity, String? stockStatus, String? backorders, bool? backordersAllowed, bool? backordered, bool? soldIndividually, String? weight, ProductDimensions? dimensions, bool? shippingdRequired, bool? shippingdTaxable, String? shippingClass, int? shippingClassId, bool? reviewsAllowed, String? averagedRating, int? ratingCount, List<int>? relatedIds, List<int>? upsellIds, List<int>? crossSellIds, int? parentId, String? purchaseNote, List<ProductCategory>? categories, List<ProductTag>? tags, List<ProductImage>? images, List<ProductAttributes>? attributes, List<ProductDefaultAttributes>? defaultAttributes, List<int>? variations, List<Product>? groupedProducts, int? menuOrder, List<ProductMeta>? metaData}) Product
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object o) bool
The equality operator.
override