findKey method Null safety

Future<K?> findKey(
  1. DatabaseClient databaseClient,
  2. {Finder? finder}
)

Find one key.

Returns null if not found.

Implementation

Future<K?> findKey(DatabaseClient databaseClient, {Finder? finder}) async {
  final client = getClient(databaseClient);

  var key = await client
      .getSembastStore(this)
      .txnFindKey(client.sembastTransaction, finder);
  return (key as K?);
}