commit method

Future<void> commit()

Commit a transaction.

Implementation

Future<void> commit() {
  if (headers == null || transaction == null) {
    throw Exception('Cannot commit a transaction that has not been started.');
  }

  return _engine.commitTransaction(
    headers: headers!,
    transaction: transaction!,
  );
}