refresh method

FutureOr<void> refresh()

Re-fetches the currently loaded pages, discarding what was known about the end (it may have moved).

Notifies an EntityPaginationReset with isRefresh: true, then the events of the re-fetched pages.

Implementation

FutureOr<void> refresh() {
  var pages = loadedPages;
  _resetImpl(isRefresh: true);

  if (pages.isEmpty) return null;

  return pages
      .map((page) => loadPage(page))
      .resolveAll()
      .resolveMapped((_) => null);
}