diff --git a/lib/db_helper.dart b/lib/db_helper.dart index a6279d2..392df54 100644 --- a/lib/db_helper.dart +++ b/lib/db_helper.dart @@ -17,7 +17,7 @@ class DBHelper { Future _createDatabase() async { Database database = - await openDatabase(join(await getDatabasesPath(), 'mydb.db'), + await openDatabase(join(await getDatabasesPath(), 'lists.db'), onCreate: (Database db, int version) { db.execute(""" CREATE TABLE List( @@ -34,6 +34,20 @@ class DBHelper { list_id INTEGER ) """); + db.execute(""" + INSERT INTO List(id, list_name, is_template) + VALUES + (0, 'test list', 0), + (1, 'test template', 1) + """); + db.execute(""" + INSERT INTO CHECK(check_text, value, list_id) + VALUES + ('test check', 1, 0), + ('test uncheck', 0, 0), + ('test check', 1, 1), + ('test uncheck', 0, 1) + """); }, version: 1); return database; }