resetAutoId static method
Reset auto increment ID. It may not working before u clear your table.
Implementation
static Future<void> resetAutoId(DatabaseExecutor db, {String? tableName}) async {
String sql = "UPDATE sqlite_sequence SET seq = 0 ${tableName != null ? " WHERE name = '$tableName'" : ""}";
await db.execute(sql);
}