Ok<O, E> class
Creates the Ok
value of a Result
See also:
ok(..)
for returing aResult
when you can't returnOk
itself.
Constructors
- Ok(O val)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isErr → bool
-
returns whether the result is
Err
without exposing the value.no setteroverride - isOk → bool
-
returns whether the result is
Ok
without exposing the value.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- val → O
-
final
Methods
-
err(
) → E? -
Returns the
Err
value as nullable.override -
fold<
B> (B isOk(O ok), B isErr(E err)) → B -
Breaks the result into
Ok
orErr
.override -
map<
A, B> ({A ok(O ok)?, B err(E err)?}) → Result< A, B> -
Take the current
Result
and transform it's values to a newResult
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ok(
) → O? -
Returns the
Ok
value as nullable.override -
toString(
) → String -
A string representation of this object.
inherited
-
unwrap(
[dynamic _]) → O -
Unwrap the result to get the
Ok
value.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override