-
-
Save Rahiche/50b3ff2bba0485ba16f4e00d603c05e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initDB() async { | |
Directory documentsDirectory = await getApplicationDocumentsDirectory(); | |
String path = join(documentsDirectory.path, "TestDB.db"); | |
return await openDatabase(path, version: 1, onOpen: (db) { | |
}, onCreate: (Database db, int version) async { | |
await db.execute("CREATE TABLE Client (" | |
"id INTEGER PRIMARY KEY," | |
"first_name TEXT," | |
"last_name TEXT," | |
"blocked BIT" | |
")"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment