Created
June 30, 2022 09:33
-
-
Save nbnD/d494f0c4e1384ddb7ff4b7e991dac202 to your computer and use it in GitHub Desktop.
CRUD
This file contains hidden or 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
static Future<int> createItem(String? title, String? descrption) async { | |
final db = await DatabaseHelper.db(); | |
final data = {'title': title, 'description': descrption}; | |
final id = await db.insert('items', data, | |
conflictAlgorithm: sql.ConflictAlgorithm.replace); | |
return id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment