Either<L, R> class sealed

Inheritance
Implementers

Constructors

Either()
const
Either.fromNullable(R? r, L onNull())
factory
Either.fromPredicate(R r, bool predicate(R r), L onFalse(R r))
If calling predicate with r returns true, then return Right(r). Otherwise return Left containing the result of onFalse.
factory
Either.safeCast(dynamic value, L onError(dynamic value))
factory
Either.tryCatch({required R execute(), required L onError(Object o, StackTrace s)})
factory

Properties

asEffect Effect<Never, L, R>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

andThen<C>(C f(R r)) Either<L, C>
ap<V>(Either<L, V Function(R r)> f) Either<L, V>
filterOrLeft<C>({required bool predicate(R r), required L orLeftWith(R r)}) Either<L, R>
flatMap<C>(Either<L, C> f(R r)) Either<L, C>
flip() Either<R, L>
getLeft() Option<L>
getOrElse(R orElse(L l)) → R
getOrNull() → R?
getRight() Option<R>
map<V>(V f(R r)) Either<L, V>
mapBoth<C, D>({required D onLeft(L l), required C onRight(R r)}) Either<D, C>
mapLeft<C>(C f(L l)) Either<C, R>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse<C>(Either<C, R> orElse(L l)) Either<C, R>
provide<V>() Effect<V, L, R>
tap<C>(Either<L, C> f(R r)) Either<L, R>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getLefts<L, R>(Iterable<Either<L, R>> iterable) Iterable<L>
getRights<L, R>(Iterable<Either<L, R>> iterable) Iterable<R>
safeCastStrict<L, R, V>(V value, L onError(V value)) Either<L, R>