async<T> static method
Creates an asynchronous computed value.
The compute function must return a Future.
Set showWaiting to true to emit LxWaiting when recomputing.
Set staticDeps to true if the dependency graph is constant.
Implementation
static LxAsyncComputed<T> async<T>(
Future<T> Function() compute, {
bool Function(T previous, T current)? equals,
bool showWaiting = false,
bool staticDeps = false,
T? initial,
String? name,
LxAsyncConcurrency concurrency = LxAsyncConcurrency.latest,
}) {
return LxAsyncComputed<T>(
compute,
equals: equals,
showWaiting: showWaiting,
staticDeps: staticDeps,
initial: initial,
name: name,
concurrency: concurrency,
);
}