Initialize MVVM architecture

This commit is contained in:
Emeline G
2020-08-06 16:25:47 +02:00
parent 4d6ca678fc
commit 8257eadee5
10 changed files with 59 additions and 107 deletions

21
lib/viewmodels/db.dart Normal file
View File

@@ -0,0 +1,21 @@
// Future<Database> OpenLocalBdd() async {
// // Open the database and store the reference.
// final Future<Database> database = openDatabase(
// // Set the path to the database. Note: Using the `join` function from the
// // `path` package is best practice to ensure the path is correctly
// // constructed for each platform.
// join(await getDatabasesPath(), 'astronote_database.db'),
// onCreate: (db, version) {
// // Run the CREATE TABLE statement on the database.
// return db.execute(
// "CREATE TABLE credentials(id INTEGER PRIMARY KEY, name TEXT, age INTEGER)",
// );
// },
// // Set the version. This executes the onCreate function and provides a
// // path to perform database upgrades and downgrades.
// version: 1,
//
// );
// print(await getDatabasesPath());
// await database;
// }