deleteDatabase static method

Future<void> deleteDatabase([
  1. String dbName = 'sqlite3_databases'
])

Deletes an IndexedDB database.

Implementation

static Future<void> deleteDatabase(
    [String dbName = 'sqlite3_databases']) async {
  // A bug in Dart SDK can cause deadlock here. Timeout added as workaround
  // https://github.com/dart-lang/sdk/issues/48854
  await indexedDB!.deleteDatabase(dbName).completeOrBlocked().timeout(
      const Duration(milliseconds: 1000),
      onTimeout: () => throw VfsException(1));
}