Either<L, R> class abstract

source from package:dartz functional entity, holding either a failure or a value

Constructors

Either()
const

Properties

get → R?
no setter
hashCode int
The hash code for this object.
no setterinherited
isNotEmpty → dynamic
no setter
leftOrCrash → L
no setter
rightOrCrash → R
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all(bool f(R r)) bool
andThen<R2>(Either<L, R2> next) Either<L, R2>
any(bool f(R r)) bool
bind<R2>(_Function1<R, Either<L, R2>> f) Either<L, R2>
every(bool f(R r)) bool
filter(bool predicate(R r), L fallback()) Either<L, R>
flatMap<R2>(_Function1<R, Either<L, R2>> f) Either<L, R2>
fold<B>(B ifLeft(L l), B ifRight(R r)) → B
foldLeft<B>(B z, B f(B previous, R r)) → B
foldLeftWithIndex<B>(B z, B f(B previous, int i, R r)) → B
foldRight<B>(B z, B f(R r, B previous)) → B
foldRightWithIndex<B>(B z, B f(int i, R r, B previous)) → B
getOrElse(R dflt()) → R
isLeft() bool
isRight() bool
leftMap<L2>(L2 f(L l)) Either<L2, R>
length() int
map<R2>(R2 f(R r)) Either<L, R2>
mapWithIndex<B>(B f(int i, R r)) Either<L, B>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse(Either<L, R> other()) Either<L, R>
swap() Either<R, L>
toString() String
A string representation of this object.
override
where(bool predicate(R r), L fallback()) Either<L, R>

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator |(R dflt) → R