-
-
Save parzibyte/48cb80de8b1ea07b458d0aca49fee454 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
await db.execute(''' | |
CREATE TABLE IF NOT EXISTS Product ( | |
id INTEGER PRIMARY KEY, | |
title TEXT | |
) | |
'''); | |
await db.insert('Product', <String, Object?>{'title': 'Product 1'}); | |
await db.insert('Product', <String, Object?>{'title': 'Product 1'}); | |
var result = await db.query('Product'); | |
print(result); | |
// prints [{id: 1, title: Product 1}, {id: 2, title: Product 1}] | |
await db.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment