Cart class
Constructors
-
Cart({String? createdAt, String? currency, int? discountCents, String? email, String? id, List<CartItem> items = const [], int? lineTotalCents, String? order, int? shippingCents, String? status, String? store, int? subtotalCents, int? taxCents, int? totalCents, String? updatedAt, String? user})
-
Returns a new Cart instance.
Properties
-
createdAt
↔ String?
-
CreatedAt is when the cart was opened, RFC3339.
getter/setter pair
-
currency
↔ String?
-
Currency is the ISO 4217 code every amount below is denominated in.
getter/setter pair
-
discountCents
↔ int?
-
DiscountCents is what coupons and promotions took off, in whole cents.
getter/setter pair
-
email
↔ String?
-
Email is the shopper's address, when the cart carries one.
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setteroverride
-
id
↔ String?
-
ID is the cart's id — what every other cart op addresses it by, and what a storefront persists against the browser session.
getter/setter pair
-
items
↔ List<CartItem>
-
Items are the cart's lines, in the order they were added.
getter/setter pair
-
lineTotalCents
↔ int?
-
LineTotalCents is the sum of the lines before any discount, in whole cents.
getter/setter pair
-
order
↔ String?
-
Order is the order this cart became, once checkout completed it. Empty until then, and its presence is what makes a cart final.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
shippingCents
↔ int?
-
ShippingCents is the shipping charge, in whole cents. It stays zero until a shipping option is priced at checkout.
getter/setter pair
-
status
↔ String?
-
Status is "active" for a cart still being filled, "ordered" once checkout turned it into an order, and "discarded" when the shopper abandoned it.
getter/setter pair
-
store
↔ String?
-
Store is the storefront the cart is being filled on.
getter/setter pair
-
subtotalCents
↔ int?
-
SubtotalCents is LineTotalCents less DiscountCents, in whole cents.
getter/setter pair
-
taxCents
↔ int?
-
TaxCents is the sales tax, in whole cents. It stays zero until checkout resolves the shopper's tax region.
getter/setter pair
-
totalCents
↔ int?
-
TotalCents is what the shopper pays: subtotal plus shipping plus tax, in whole cents.
getter/setter pair
-
updatedAt
↔ String?
-
UpdatedAt is when the cart was last amended, RFC3339.
getter/setter pair
-
user
↔ String?
-
User is the signed-in shopper this cart belongs to, empty for a guest cart.
getter/setter pair