initHive static method

Future<void> initHive()

Initializes Hive and opens boxes

Implementation

static Future<void> initHive() async {
  await Hive.initFlutter();

  final encryptionKey = await EncryptionHelper.getEncryptionKey();

  // Open boxes
  await Hive.openBox(commonBoxName, encryptionCipher: HiveAesCipher(encryptionKey));

}