Product class

Constructors

Product({required String name, required String sku, required double price, int? quantity, String? variant, String? category, String? brand, int? position, String? couponCode, Map<String, String?>? attributes})

Properties

attributes → Map<String, String?>?
A map containing further information about the product.
final
brand → String?
The product brand.
final
category → String?
A category to which the product belongs.
final
couponCode → String?
The coupon associated with the product.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The product name.
final
position → int?
The position of the product on the screen.
final
price → double
The price of a product
final
quantity → int?
The quantity of the product. Default value is 1.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sku → String
SKU of a product. This is the product id.
final
variant → String?
The variant of the product.
final

Methods

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

Static Methods

fromJson(Map<String, dynamic> json) → Product