Left<L, R> class
Used for "failure"
Constructors
- Left(L value)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLeft → bool
-
Represents the left side of Either class which by convention is a "Failure".
no setterinherited
- isRight → bool
-
Represents the right side of Either class which by convention is a "Success"
no setterinherited
- left → L
-
Get Left value, may throw an exception when the value is Right
no setterinherited
- right → R
-
Get Right value, may throw an exception when the value is Left
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → L
-
final
Methods
-
either<
TL, TR> (TL fnL(L left), TR fnR(R right)) → Either< TL, TR> -
Transform values of Left and Right
override
-
fold<
T> (T fnL(L left), T fnR(R right)) → T -
Fold Left and Right into the value of one type
override
-
map<
TR> (TR fnR(R right)) → Either< L, TR> -
Transform value of Right
override
-
mapAsync<
TR> (FutureOr< TR> fnR(R right)) → Future<Either< L, TR> > -
Transform value of Right
override
-
mapLeft<
TL> (TL fnL(L left)) → Either< TL, R> -
Transform value of Left
override
-
mapLeftAsync<
TL> (FutureOr< TL> fnL(L left)) → Future<Either< TL, R> > -
Transform value of Left
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
swap(
) → Either< R, L> -
Swap Left and Right
inherited
-
then<
TR> (Either< L, TR> fnR(R right)) → Either<L, TR> -
Transform value of Right when transformation may be finished with an error
override
-
thenAsync<
TR> (FutureOr< Either< fnR(R right)) → Future<L, TR> >Either< L, TR> > -
Transform value of Right when transformation may be finished with an error
override
-
thenLeft<
TL> (Either< TL, R> fnL(L left)) → Either<TL, R> -
Transform value of Left when transformation may be finished with an Right
override
-
thenLeftAsync<
TL> (FutureOr< Either< fnL(L left)) → Future<TL, R> >Either< TL, R> > -
Transform value of Left when transformation may be finished with an Right
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object obj) → bool -
The equality operator.
inherited