change title of checklist

This commit is contained in:
marcoabat
2023-08-07 00:26:03 +02:00
parent 69e94d323a
commit e0b5df3de2
3 changed files with 85 additions and 37 deletions

View File

@@ -49,6 +49,12 @@ class DbHelper {
return checklists;
}
static Future<void> updateChecklistTitle(int id, String title) async {
await _client
.from(checklistsTableName)
.update({'title': title}).eq('id', id);
}
/// returns id of newly created checklist
static Future<int> addOrUpdateChecklist(Checklist? checklist) async {
final ownerId = _client.auth.currentSession!.user.id;