deleteAllResources method

Future<bool> deleteAllResources({
  1. String? pw,
})

Deletes all resources, including historical versions

Implementation

Future<bool> deleteAllResources({String? pw}) async {
  try {
    await _ensureInit(pw: pw);
    for (final Dstu2ResourceType type in _types) {
      final Box<Map<dynamic, dynamic>> box =
          await _getBox(resourceType: type, pw: pw);
      await box.deleteFromDisk();
    }
    return true;
  } catch (e) {
    return false;
  }
}