refresh method
Refresh a page that has or has not been fetched
pageThe page to refresh. If null, it'll refresh the last page
Implementation
Future<DataType?> refresh([PageType? page]) async {
page ??= lastPage;
if (_mutex.isLocked)
return state.pages.firstWhereOrNull((e) => e.page == page)?.data;
return await _operate(page!).then((_) {
return state.pages.firstWhereOrNull((e) => e.page == page)?.data;
});
}