Variant3<T0, T1, T2> class
sealed
A type-safe discriminated union holding either T0, T1, or T2.
- Implementers
Constructors
- Variant3.withT0(T0 value)
-
Creates a variant holding a
T0value.factory - Variant3.withT1(T1 value)
-
Creates a variant holding a
T1value.factory - Variant3.withT2(T2 value)
-
Creates a variant holding a
T2value.factory
Properties
Methods
-
holdsAlternative<
T> () → bool - Checks if the variant currently holds the specified type alternative.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visit<
R> ({required R onT0(T0), required R onT1(T1), required R onT2(T2)}) → R - Visits the underlying value with exhaustive matching.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited