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