StoreAttribute class

One attribute of a product, with the values it can take.

Constructors

StoreAttribute({int id = 0, String name = '', String taxonomy = '', bool hasVariations = false, List<StoreTerm> terms = const <StoreTerm>[]})
Creates an attribute.
const
StoreAttribute.fromJson(Map<String, Object?> json)
Reads the Store API's representation.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasVariations → bool
Whether choosing this attribute picks a variation.
final
id → int
Attribute id. Zero for a product-specific attribute.
final
name → String
Display name, such as Colour.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taxonomy → String
The taxonomy, such as pa_colour. Empty for product-specific ones.
final
terms → List<StoreTerm>
The values on offer.
final
wireName → String
What to send as the attribute key when adding to the cart.
no setter

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