FutureOrExtension<T extends Object> extension

on

Properties

asAsync Future<T>
Casts a value to a Future wrap the value in a Future if it is synchronous.
no setter
asSync → T
Casts a value to a synchronous value or throws a TypeError if the value is a Future.
no setter
asSyncOrNull → T?
Casts a value to a synchronous value or returns null if the value is a Future.
no setter

Methods

thenOr<R extends Object?>(TSyncOrAsyncMapper<T, R> callback, {void onError(Object e)?}) FutureOr<R>
Maps a synchronous or asynchronous value to another.