Either<L, R> class abstract

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
isLeft bool
A getter that returns a boolean indicating whether the instance of Either is a Left instance.
no setter
isRight bool
A getter that returns a boolean indicating whether the instance of Either is a Right instance.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fold<T>(T leftFn(L l), T rightFn(R r)) → T
A generic method that takes two functions, leftFn and rightFn, as parameters.
leftOrNull() → L?
Returns the value of the left property if the Either instance is a Left instance, otherwise returns null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rightOrNull() → R?
Returns the value of the Right property if the Either instance is a Right instance, otherwise returns null.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited