initialize method
Initializes the repository and opens the Hive box.
This method must be called before using any other repository methods.
Implementation
Future<void> initialize() async {
_box = await Hive.openBox<SearchHistoryItem>(boxName);
}
Initializes the repository and opens the Hive box.
This method must be called before using any other repository methods.
Future<void> initialize() async {
_box = await Hive.openBox<SearchHistoryItem>(boxName);
}