initialize method

Future<void> initialize()

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<Map<dynamic, dynamic>>(boxName);
}