getAllGeneral method

Future<Iterable<Object>> getAllGeneral({
  1. String? pw,
})

Implementation

Future<Iterable<Object>> getAllGeneral({
  String? pw,
}) async {
  await _ensureInit(pw: pw);
  final HiveAesCipher? cipher = cipherFromKey(key: pw);
  final Box<Object> box;
  if (!Hive.isBoxOpen('general')) {
    box = await Hive.openBox('general', encryptionCipher: cipher);
  } else {
    box = Hive.box('general');
  }
  final Map<dynamic, Object> boxData = box.toMap();
  return boxData.values;
}