Either<L, R> class sealed

Represents a value that can be either of type L or of type R. Usually L is assumed to be of Error type and R of Right type, e.g.:

typedef Result<T> = Either<Exception, T>;
Implementers
Available Extensions

Constructors

Either.left(L value)
const
factory
Either.right(R value)
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

combine<R2>(Either<L, R2> other) Either<L, (R, R2)>
flatMap<T>(Either<L, T> f(R)) Either<L, T>
fold<T>(T onLeft(L), T onRight(R)) → T
isLeft() bool
isRight() bool
map<T>(T f(R)) Either<L, T>
mapLeft<L1>(L1 f(L)) Either<L1, R>
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