BasketItem class

A representation of an item in the shopping cart.

Constructors

BasketItem({String? productId, String? productName, String? sku, String? productGroup, List<String> variants = const [], double price = 0.0, int quantity = 0})
Creates a new BasketItem with the provided parameters.

Properties

hashCode int
The hash code for this object.
no setterinherited
price double
The price of the product.
getter/setter pair
productGroup String?
The category of the product.
getter/setter pair
productId String?
The ID of the product without variants. Multiple variants of the same product can share the same product ID.
getter/setter pair
productName String?
The name of the product.
getter/setter pair
quantity int
The number of items of this product in the basket.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sku String?
The stock-keeping unit (SKU), which is the unique identifier for the product, including its variants. Each variant of a product has its own SKU.
getter/setter pair
variants List<String>
A list of variants associated with the product.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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