close method

Future<void> close(
  1. bool commit
)

Closes the session.

The commit parameter indicates whether to commit the session.

Throws an AskarSessionException if the session fails to close.

Implementation

Future<void> close(bool commit) async {
  try {
    (await askarSessionClose(this, commit)).throwOnError();
  } catch (e) {
    throw AskarSessionException('Failed to close session: $e');
  }
}