ValueResult<T> class Null safety

A result representing a returned value.

Implemented types

Constructors

ValueResult(T value)

Properties

asError ErrorResult?
If this is an error result, returns itself.
read-onlyoverride
asFuture Future<T>
A future that has been completed with this result as a value or an error.
read-onlyoverride
asValue ValueResult<T>
If this is a value result, returns itself.
read-onlyoverride
hashCode int
The hash code for this object.
read-onlyoverride
isError bool
Whether this result is an error result.
read-onlyoverride
isValue bool
Whether this result is a value result.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
value → T
The result of a successful computation.
final

Methods

addTo(EventSink<T> sink) → void
Adds this result to an EventSink.
override
complete(Completer<T> completer) → void
Completes a completer with this result.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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