initAsync method

  1. @override
  2. @mustCallSuper
Future<void> initAsync({
  1. HiveCipher? encryptionCipher,
  2. String? path,
  3. String? collection,
})
override

The function that is called after opening the box. Must definitely wait

Implementation

@override
@mustCallSuper
Future<void> initAsync({
  HiveCipher? encryptionCipher,
  String? path,
  String? collection,
}) async {
  _box = await _hive.openLazyBox<String>(
    databaseName,
    collection: collection,
    encryptionCipher: encryptionCipher,
    path: path,
  );
  await initMigrations();
  await initExpiredSystem();
  await super.initAsync();
}