open method

Future<void> open(
  1. String dbPath, {
  2. TDB2Config? config,
  3. bool ifOpenedWillClose = true,
})

Implementation

Future<void> open(
  String dbPath, {
  TDB2Config? config,
  bool ifOpenedWillClose = true,
}) async {
  if (ifOpenedWillClose) {
    await close();
  }
  _dbFile = File(dbPath);
  _indexedDB.setConfig(_dbFile, config ?? TDB2Config.empty());
  await _indexedDB.load();
  _isOpened = true;
}