dropTable method

Future<List<Map<String, Object?>>> dropTable(
  1. String name
)

删除表

Implementation

Future<List<Map<String, Object?>>> dropTable(String name) async {
  if (_db == null) return Future.error("数据库未初始化,无可用数据。");
  return await _db!
      .rawQuery("DROP TABLE $name")
      .onError((error, stackTrace) => throw Exception(error));
}