close method
Closes this database connection and releases all resources associated with it. Implementations should also handle close calls in a state where the database isn't open.
Implementation
@override
Future<void> close() async {
  if (_delegateAvailable) {
    return await _delegate.close();
  } else if (_openDelegate case final completer?) {
    await completer.future;
    await _delegate.close();
  } else {
    // We never started opening the database, nothing to do.
  }
}