exists method

Future<bool> exists({
  1. required Dstu2ResourceType resourceType,
  2. required String id,
  3. String? pw,
})

Implementation

Future<bool> exists({
  required Dstu2ResourceType resourceType,
  required String id,
  String? pw,
}) async {
  if (!_types.contains(resourceType)) {
    return false;
  } else {
    await _ensureInit(pw: pw);
    final Box<Map<dynamic, dynamic>> box =
        await _getBox(resourceType: resourceType, pw: pw);
    return box.containsKey(id);
  }
}