CartEvent class

The class CartEvent defines a custom event with parameters for a shopping cart action.

Inheritance
Implementers

Constructors

CartEvent(String label, String action, String sku, UnitPrice finalPrice, int quantity, Map<String, Object>? parameters)

Properties

hashCode int
The hash code for this object.
no setterinherited
parameters Map<String, Object>
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asMap() Map
The function returns a map with the values of type, label, action, and parameters.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCategories(List<String> categories) → void
This function sets the categories parameter in a cart event.
setCategory(String category) → void
This function sets the category parameter for a cart event.
setDiscountedPrice(UnitPrice discountedPrice) → void
This function sets the discounted unit price for a cart event.
setName(String name) → void
This function sets the name parameter in a cart object.
setOffline(bool offline) → void
The function sets the offline parameter in the CartEventParameters map to a boolean value.
setProducer(String producer) → void
This function sets the producer parameter in a cart event.
setRegularPrice(UnitPrice regularPrice) → void
This function sets the regular unit price for a cart event.
setUrl(String url) → void
This function sets a URL parameter in a cart event.
toString() String
A string representation of this object.
inherited

Operators

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