fetchNextPage method

Future<void> fetchNextPage()

Load the next cursor page and retain normalized ID membership.

Implementation

Future<void> fetchNextPage() async {
  final graph = ref.read(entityGraphProvider);
  final list = graph.listState(queryKey);
  if (!list.hasNextPage || list.nextCursor == null) return;
  await _runWithRetry(() => _doFetch(graph, cursor: list.nextCursor));
  if (!_disposed) state = AsyncValue.data(_buildSnapshot(graph));
}