searchHistoryRepositoryProvider top-level property

Provider<SearchHistoryRepository> searchHistoryRepositoryProvider
final

Provider for the search history repository.

This provider initializes and manages the SearchHistoryRepository. It automatically disposes the repository when no longer needed.

Implementation

final searchHistoryRepositoryProvider = Provider.autoDispose<SearchHistoryRepository>((ref) {
  final repository = SearchHistoryRepository(boxName: 'search_history', maxHistoryItems: 50);

  ref.onDispose(() {
    repository.dispose();
  });

  return repository;
});