Left<L, R> class

Left is for the error case

Inheritance

Constructors

Left(L value)
Left is for the error case

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
A Left value
no setterinherited
A Right value
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → L
A Left value
final

Methods

cast<F, S>() Either<F, S>
Cast to new Left & Right type
override
either({required EitherCallback<L> onLeft, required EitherCallback<R> onRight}) → void
Either type result on Callback
override
map({required MapCallback<L> onLeft, required MapCallback<R> onRight}) Either<L, R>
Return the Either result in one of these functions.
override
mapAsync({required AsyncMapCallback<L> onLeft, required AsyncMapCallback<R> onRight}) Future<Either<L, R>>
Return the async Either result in one of these async functions.
override
maybeWhen<T>({WhenCallback<T, L>? onLeft, WhenCallback<T, R>? onRight, required MaybeCallback<T> orElse}) → T
The maybeWhen method is equivalent to when, but doesn't require all callbacks to be specified. On the other hand, it adds an extra orElse required parameter, for fallback behavior.
override
maybeWhenAsync<T>({AsyncWhenCallback<T, L>? onLeft, AsyncWhenCallback<T, R>? onRight, required AsyncMaybeCallback<T> orElse}) Future<T>
The maybeWhenAsync method is equivalent to whenAsync, but doesn't require all callbacks to be specified. On the other hand, it adds an extra orElse required parameter, for fallback behavior.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
swap() Either<R, L>
Swap Left and Right
inherited
toString() String
A string representation of this object.
inherited
when<T>({required WhenCallback<T, L> onLeft, required WhenCallback<T, R> onRight}) → T
Return the result in one of these functions.
override
whenAsync<T>({required AsyncWhenCallback<T, L> onLeft, required AsyncWhenCallback<T, R> onRight}) Future<T>
Return the async result in one of these async functions.
override

Operators

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