resetDb method
Reset the DB by deleting and recreating it.
WARNING: This is a destructive, irrevisible action.
Implementation
Future<void> resetDb() async {
try {
await (await getDb()).close();
if (databaseFactory == null) {
await deleteDatabase(dbName);
} else {
await databaseFactory?.deleteDatabase(dbName);
}
// recreate
_openDb = null;
await getDb();
} on FileSystemException {
// noop
}
}