closeResourceBoxes method
Specify a list of which boxes you want to close
Implementation
Future<void> closeResourceBoxes({
required List<Dstu2ResourceType> types,
String? pw,
}) async {
await _ensureInit(pw: pw);
for (final Dstu2ResourceType resourceType in types) {
final String resourceTypeString =
Resource.resourceTypeToString(resourceType);
if (!Hive.isBoxOpen(resourceTypeString)) {
await Hive.box(resourceTypeString).close();
}
}
}