ResultAsync<T, E> class

Implemented types

Constructors

ResultAsync(FutureOr<Result<T, E>> res)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

andThen<U, F>(FutureOr<Result<U, F>> f(T value)) ResultAsync<U, F>
asStream() Stream<Result<T, E>>
Creates a Stream containing the result of this future.
override
catchError(Function onError, {bool test(Object error)?}) Future<Result<T, E>>
Handles errors emitted by this Future.
override
map<A>(FutureOr<A> f(T t)) ResultAsync<A, E>
mapErr<U>(FutureOr<U> f(E error)) ResultAsync<T, U>
match<A>(A ok(T value), A err(E error)) Future<A>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse<A>(FutureOr<Result<T, A>> f(E error)) ResultAsync<T, A>
then<R>(FutureOr<R> onValue(Result<T, E> value), {Function? onError}) Future<R>
Register callbacks to be called when this future completes.
override
timeout(Duration timeLimit, {FutureOr<Result<T, E>> onTimeout()?}) Future<Result<T, E>>
Stop waiting for this future after timeLimit has passed.
override
toString() String
A string representation of this object.
inherited
unwrapOr(T t) Future<T>
whenComplete(FutureOr<void> action()) Future<Result<T, E>>
Registers a function to be called when this future completes.
override

Operators

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

Static Methods

combine<T, E>(Iterable<ResultAsync<T, E>> asyncResultList) ResultAsync<List<T>, E>
combineWithAllErrors<T, E>(Iterable<ResultAsync<T, E>> asyncResultList) ResultAsync<List<T>, List<E>>
fromFuture<T, E>(Future<T> future, E errorFn(Object e)) ResultAsync<T, E>
fromSafeFuture<T, E>(Future<T> future) ResultAsync<T, E>