fetch method
Implementation
Future<T?> fetch() async {
_emit(const AsyncLoading());
try {
final data = await _future;
_emit(AsyncData(data));
return data;
} catch (e, st) {
_emit(AsyncError(e, st));
}
return null;
}
Future<T?> fetch() async {
_emit(const AsyncLoading());
try {
final data = await _future;
_emit(AsyncData(data));
return data;
} catch (e, st) {
_emit(AsyncError(e, st));
}
return null;
}