Future<int?> updateNote(Note note) async { final db = await database; return await db?.update( 'notes', note.toMap(), where: 'id = ?', whereArgs: [note.id], ); }