init method

Future<void> init()

Implementation

Future<void> init() async {
  if (kIsWeb) {
    await Hive.initFlutter();
  } else {
    String path = (await getApplicationDocumentsDirectory()).path;
    await Hive.initFlutter(path);
  }
  await Hive.openBox(_cacheBox);
}