load method
Future<Resource<V> >
load(
- K key, {
- bool? forceReload,
- void doOnStore(
- V
- ResourceFetchArguments? fetchArguments,
- bool allowEmptyLoading = false,
Same as stream, but waiting only for the first completed result.
Implementation
Future<Resource<V>> load(
K key, {
bool? forceReload,
void Function(V)? doOnStore,
ResourceFetchArguments? fetchArguments,
bool allowEmptyLoading = false,
}) =>
stream(
key,
forceReload: forceReload,
doOnStore: doOnStore,
fetchArguments: fetchArguments,
allowEmptyLoading: allowEmptyLoading,
).where((r) => r.isNotLoading).first;