Ok<O, E> class final

Represents a Success

Inheritance
Annotations
  • @immutable

Constructors

Ok(O ok)
Create an Ok Result with the given value
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isErr bool
is err?
no setterinherited
isOk bool
is ok?
no setterinherited
ok → O
Wrapped value
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unwrap → O
Unwraps the value of a possible Ok, in case of Err it will throw an State Error
no setterinherited
unwrapErr → E
Unwraps the value of a possible Err, in case of Ok it will throw an State Error
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retag<O2>() Result<O2, E>
Returns a new Result with the same error type E but a different success type O2, only if this result is an Err.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override