refreshInfiniteQueryAllPages<DataType, ErrorType, PageType> method

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

Finds the InfiniteQuery with the given key and refreshes all pages using InfiniteQuery.refreshAll

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

  • exact can be used to match the key exactly or by prefix

Implementation

Future<List<DataType>?>
    refreshInfiniteQueryAllPages<DataType, ErrorType, PageType>(
  String key, {
  bool exact = true,
}) async {
  final query =
      getInfiniteQuery<DataType, ErrorType, PageType>(key, exact: exact);
  if (query == null) return [];
  return await query.refreshAll();
}