Success<L, R> class
Represents the success case of an Either.
- Inheritance
-
- Object
- DatumEither<
L, R> - Success
Constructors
- Success(R value)
-
const
Properties
- errorOrNull → L?
-
Returns the error value, or
nullif this is aSuccess.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
- successOrNull → R?
-
Returns the success value, or
nullif this is aFailure.no setterinherited - value → R
-
final
Methods
-
fold<
T> (T onFailure(L l, StackTrace? s), T onSuccess(R r)) → T -
Folds the
Eitherinto a single value.override -
getError(
) → (L, StackTrace?) -
Returns the failure value, or throws an exception if this is a
Success.inherited -
getSuccess(
) → R -
inherited
-
isFailure(
) → bool -
Returns
trueif this is aFailure.inherited -
isSuccess(
) → bool -
Returns
trueif this is aSuccess.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onFailure(
void onFailure(L l, StackTrace? s)) → void -
Performs an action on the failure value.
inherited
-
onSuccess(
void onSuccess(R r)) → void -
Performs an action on the success value.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited