Result<E, S> class
abstract
Base Result class
Receives two values E
and S
as E
is an error and S
is a success.
Constructors
- Result()
-
Default constructor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get(
) → dynamic - Returns the current result.
-
getError(
) → E? -
Returns the value of
E
. -
getSuccess(
) → S? -
Returns the value of
S
. -
isError(
) → bool - Returns true if the current result is an Error.
-
isSuccess(
) → bool - Returns true if the current result is a success.
-
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.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited