Ok<T, E> class
final
A successful Result.
Properties
- errorOrNull → E?
-
The failure error, or
nullwhen this is an Ok.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isErr → bool
-
Whether this is an Err result.
no setterinherited
- isOk → bool
-
Whether this is an Ok result.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The success value.
final
- valueOrNull → T?
-
The success value, or
nullwhen this is an Err.no setterinherited
Methods
-
getOrThrow(
) → T -
Returns the success value or throws the failure error. Intended for
tests and explicit adapter boundaries (mirrors pi's
getOrThrow).inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited