exists method

Future<bool> exists(
  1. String name,
  2. String key
)

Checks if a entry exists

  • name: The partition name
  • key: The key

Returns true if contains a entry with the provided key

Implementation

Future<bool> exists(String name, String key) {
  final partition = _partition(name);

  if (partition != null) {
    return partition.record(key).exists(_db);
  }

  return Future.value(false);
}