CartItem class
Properties
-
free
↔ bool?
-
Free reports a line that costs nothing because a coupon or a promotion made it so, rather than because its price is zero.
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setteroverride
-
id
↔ String?
-
ID is the line's identity — the variant id when the line is a variant, otherwise the product id. It is what a subsequent set call addresses.
getter/setter pair
-
kind
↔ String?
-
Kind is "variant" when this line is a specific sellable variant and "product" when it is the product itself.
getter/setter pair
-
name
↔ String?
-
Name is the item's display name, cached onto the line when it was added so a cart renders without a second read.
getter/setter pair
-
priceCents
↔ int?
-
PriceCents is the unit price in whole cents, cached at the moment the line was added. The line's contribution to the cart is this times Quantity.
getter/setter pair
-
quantity
↔ int?
-
Quantity is how many units of this item the cart holds.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sku
↔ String?
-
SKU is the line's stock-keeping unit — the variant's when it has one, otherwise the product's. Empty when neither carries one.
getter/setter pair