refresh method
Implementation
Future<void> refresh(AbstractListRefreshEvent event, Emitter<S> emit) async {
if (state is AbstractListFilterablePaginatedState) {
(state as AbstractListFilterablePaginatedState).searchModel.reset();
}
await onBeforeRefresh(event, emit);
try {
emit(await convertResultToStateAfterRefresh(await resolveData()));
} catch (e) {
await for (final result in resolveStreamData()) {
emit(await convertResultToStateAfterRefresh(result));
await onAfterRefresh(event, emit, result);
}
}
}