Either<L, R> class
abstract
Abstract Either type representing a value of one of two possible types (Left or Right).
Constructors
- Either()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLeft → bool
-
Returns true if the value is a Left.
no setter
- isRight → bool
-
Returns true if the value is a Right.
no setter
- left → L
-
Gets the Left value. Throws if it's Right.
no setter
- right → R
-
Gets the Right value. Throws if it's Left.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fold<
T> (T ifLeft(L), T ifRight(R)) → T -
Applies either
ifLeftorifRightdepending on the instance. -
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