delete method

  1. @override
Future<void> delete(
  1. String path
)
override

Delete a database

Implementation

@override
Future<void> delete(String path) async {
  try {
    if (_debug) {
      // ignore: avoid_print
      print('[idb] deleting $path');
    }

    databases.remove(path);
    checkAllClosed();

    await idbFactory.deleteDatabase(path);
    notifyRevision(NotificationRevision(path, 0));
    if (_debug) {
      // ignore: avoid_print
      print('[idb] deleted $path');
    }
  } catch (e) {
    if (_debug) {
      // ignore: avoid_print
      print(e);
    }
  }
}