Success<E, S> class
Success Result.
return it when the result of a Result is the expected value.
- Implemented types
-
- Result<
E, S>
- Result<
- Annotations
-
- @immutable
Constructors
- Success(S _success)
-
Receives the
S
param as the successful result.const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get(
) → S -
Returns the current result.
override
-
getError(
) → E? -
Returns the value of
E
.override -
getSuccess(
) → S? -
Returns the value of
S
.override -
isError(
) → bool -
Returns true if the current result is an Error.
override
-
isSuccess(
) → bool -
Returns true if the current result is a success.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
W> (W whenError(E error), W whenSuccess(S success)) → W -
Return the result in one of these functions.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override