refreshInfiniteQuery<DataType, ErrorType, PageType> method

Future<DataType?> refreshInfiniteQuery<DataType, ErrorType, PageType>(
  1. String key, {
  2. PageType? page,
  3. bool exact = true,
})

Finds the InfiniteQuery with the given key and refreshes using InfiniteQuery.refresh

It'll return the refreshed data and will return null if fails

  • exact can be used to match the key exactly or by prefix
  • page can be used to only refresh a specific page or else it'll refresh the lastPage

Implementation

Future<DataType?> refreshInfiniteQuery<DataType, ErrorType, PageType>(
  String key, {
  PageType? page,
  bool exact = true,
}) async {
  final query =
      getInfiniteQuery<DataType, ErrorType, PageType>(key, exact: exact);
  if (query == null) return null;
  return await query.refresh(page);
}