Variant class
A feature flag variant containing the evaluated value and metadata.
Returned by ExperimentClient.variant and as values in the map from ExperimentClient.all. Can also be used as a fallback variant in ExperimentConfig.fallbackVariant or ExperimentConfig.initialVariants.
Constructors
Properties
- expKey → String?
-
The experiment key that produced this variant, if applicable.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- key → String?
-
The variant key, typically used to identify the variant assignment.
final
-
metadata
→ Map<
String, Object?> ? -
Additional metadata associated with this variant.
final
- payload → Object?
-
An optional dynamic payload attached to the variant.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String?
-
The variant value, such as
'on','control', or'treatment'.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override