refreshInfiniteQueriesAllPagesWithPrefix method
Finds all the InfiniteQuery that starts with the given prefix
and refreshes all pages using InfiniteQuery.refreshAll
It returns a Map with the key as the matched query key and the value as the refreshed data
It'll return the refreshed data and will return null if fails
Implementation
Future<Map<String, List?>> refreshInfiniteQueriesAllPagesWithPrefix(
String prefix,
) async {
final queries = getInfiniteQueriesWithPrefix(prefix);
return await Future.wait(queries.map(
(query) async => MapEntry(query.key, await query.refreshAll())))
.then((qs) => Map.fromEntries(qs));
}