OfferPrice class
One of 2 variants, chosen by the property names of the JSON object. Patched in by scripts/sdk.cjs: the generator flattens this union into its first variant, which cannot read the others.
Constructors
- OfferPrice(Object value)
-
Wraps exactly one variant: FixedPrice, PriceRange.
const
Properties
- fixed → FixedPrice?
-
The "fixed" variant, or null when the value is another one.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- range → PriceRange?
-
The "range" variant, or null when the value is another one.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → Object
-
The variant. Use the getters below, or a type check, to read it.
final
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) → OfferPrice? - Returns a new OfferPrice from a decoded JSON object, or null for something that is not an object. Throws a FormatException when no variant fits: skipping it would hide a purchase or a price.
-
listFromJson(
dynamic json, {bool growable = false}) → List< OfferPrice> -
mapFromJson(
dynamic json) → Map< String, OfferPrice> -
mapListFromJson(
dynamic json, {bool growable = false}) → Map< String, List< OfferPrice> >