FutureResource<T> constructor
FutureResource<T> ({})
Create a FutureResource. If a future is provided it will be
started immediately.
Implementation
FutureResource({
Future<T> Function()? future,
bool perserveResult = false,
this.retryOnError,
}) : _perserveResult = perserveResult,
super(const FutureResourceValue()) {
if (future != null) {
_startOperation(future());
}
}