AsyncSignal<T>.fromFuture constructor
AsyncSignal<T>.fromFuture (})
Creates an AsyncSignal from a Future factory.
Dart Futures are not intrinsically cancellable. Use onCancel to cancel
the underlying HTTP request, isolate task, or other operation when this
signal reloads or is disposed.
Implementation
AsyncSignal.fromFuture(
Future<T> Function() futureFn, {
String? name,
bool autoDispose = false,
void Function()? onDispose,
FutureOr<void> Function()? onCancel,
}) : _futureFactory = futureFn,
_streamFactory = null,
_onCancel = onCancel,
super(
const AsyncLoading(),
name: name,
autoDispose: autoDispose,
onDispose: onDispose,
) {
_initialize();
}