recentSearchesProvider top-level property

AutoDisposeFutureProvider<List<String>> recentSearchesProvider
final

Provider for recent search history.

This provider exposes the user's recent search queries.

Implementation

final recentSearchesProvider = FutureProvider.autoDispose<List<String>>((
  ref,
) async {
  final historyRepo = ref.watch(searchHistoryRepositoryProvider);
  await historyRepo.initialize();
  return historyRepo.getRecentSearches(limit: 10);
});