RxSuccess<T> class final

Success result

Inheritance

Properties

errorOrNull RxException?
Get the error if failed, or null if successful
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
isFailure bool
Whether this result represents failure
no setterinherited
isSuccess bool
Whether this result represents success
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
Get value or throw exception
final
valueOrNull → T?
Get the value if successful, or null if failed
no setterinherited

Methods

flatMap<R>(RxResult<R> transform(T value)) RxResult<R>
Chain operations that return RxResult
inherited
map<R>(R transform(T value)) RxResult<R>
Transform the value if successful, or return the failure
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFailure(void callback(RxException error)) → void
Execute callback if failed
inherited
onSuccess(void callback(T value)) → void
Execute callback if successful
inherited
toString() String
A string representation of this object.
override
valueOr(T fallback) → T
Get value or return fallback
inherited
valueOrElse(T fallback()) → T
Get value or compute fallback
inherited

Operators

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