CartItemSet class
Constructors
- CartItemSet({String? id, String? product, int? quantity, String? variant})
- Returns a new CartItemSet instance.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- id ↔ String?
-
ID is the cart to amend, from the path.
getter/setter pair
- product ↔ String?
-
Product names the catalog product to set, by its id or its URL slug. Give this or Variant, never both; a request naming neither is refused.
getter/setter pair
- quantity ↔ int?
-
Quantity is how many of that item the cart should hold AFTER this call — it is the resulting count, not a delta, so sending 3 twice leaves 3 and not 6. ZERO REMOVES the line, which is the only way to take an item out.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- variant ↔ String?
-
Variant names the specific sellable variant to set, by its id or its SKU. Prefer it over Product for anything sold in sizes, colours or tiers — the price and the stock are the variant's, not the product's.
getter/setter pair
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
dynamic value) → CartItemSet? -
Returns a new CartItemSet instance and imports its values from
valueif it's a Map, null otherwise. -
listFromJson(
dynamic json, {bool growable = false}) → List< CartItemSet> -
mapFromJson(
dynamic json) → Map< String, CartItemSet> -
mapListFromJson(
dynamic json, {bool growable = false}) → Map< String, List< CartItemSet> >
Constants
-
requiredKeys
→ const Set<
String> - The list of required keys that must be present in a JSON.