commitAsync method

Future<void> commitAsync([
  1. CancellationToken? cancellationToken
])

Commits the changes to the Realm asynchronously. Canceling the commit using the cancellationToken will not abort the transaction, but rather resolve the future immediately with a CancelledException.

Implementation

Future<void> commitAsync([CancellationToken? cancellationToken]) async {
  final realm = _ensureOpen('commitAsync');

  await realmCore.commitWriteAsync(realm, cancellationToken);

  _closeTransaction();
}