ErrorOr<T> class
abstract
Constructors
- ErrorOr.error(Object error)
-
Create an ErrorOr instance of type
_ErrorWrapper
given an error.constfactory - ErrorOr.value(T value)
-
Create an ErrorOr instance of type
_ValueWrapper
given a value.constfactory
Properties
- error → Object
-
Return the error Object of
_ErrorWrapper
or throws ErrorOrTypeError if ErrorOr is not a_ErrorWrapper
.no setter - hasError → bool
-
Returns true if ErrorOr is a
_ErrorWrapper
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasValue → bool
-
Returns true if ErrorOr is a
_ValueWrapper
.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
Return the value
T
of_ValueWrapper
or throws ErrorOrTypeError if ErrorOr is not a_ValueWrapper
.no setter
Methods
-
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