close method

  1. @override
void close()

Close the database

Implementation

@override
void close() {
  if (!_closed) {
    // Clear from our list of open database

    var list = _factory.databases[_path];
    if (list != null) {
      list.remove(this);
      if (list.isEmpty) {
        _factory.databases.remove(_path);
      }
      _factory.checkAllClosed();
    }
    if (_debug) {
      // ignore: avoid_print
      print('$_debugPrefix closing');
    }
    _closed = true;
    _idbDatabase.close();
  }
}