deleteSql static method

dynamic deleteSql({
  1. List? name,
})

删除数据库

Implementation

static deleteSql({List? name}) async {
  var databasesPath = await getDatabasesPath();
  if (name != null) {
    name.add(NAME);
  } else {
    name = [NAME];
  }
  for (var i in name) {
    String path = join(databasesPath, i);
    await databaseExists(path).then((value) {
      if (value) {
        deleteDatabase(path);
      }
    });
  }
}