Result<T> class

Inheritance

Constructors

Result.error(BaseError error)
Result.ok(T value)

Properties

error BaseError
error is a getter that returns the error.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ResultState
getter/setter pairinherited
value → T
value is a getter that returns the value.
no setterinherited

Methods

isError() bool
isError returns true if Results represents an error.
inherited
isErrorAnd(bool f(BaseError)) bool
isErrorAnd returns true if Results represents an error and the additional code of f returns true.
inherited
isOk() bool
isOk returns true if Results represents an ok result.
inherited
isOkAnd(bool f(T)) bool
isOkAnd returns true if Results represents an ok result and the additional code of f returns true.
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