delete method Null safety

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

Delete records matching a given finder.

Return the count updated. Delete all if no finder

Implementation

Future<int> delete(DatabaseClient databaseClient, {Finder? finder}) {
  final client = getClient(databaseClient);
  return client.inTransaction((txn) async {
    return (await client.getSembastStore(this).txnClear(txn, finder: finder))
        .length;
  });
}