feat: Introduce category selection functionality in NoteEditorScreen and related components

This commit is contained in:
2026-05-21 19:31:29 +02:00
parent 7e210871dd
commit 8be7819528
7 changed files with 421 additions and 58 deletions
+8 -2
View File
@@ -1,5 +1,7 @@
import 'package:uuid/uuid.dart';
const Object _unsetCategoryId = Object();
// Model: Note
// - Representa una nota guardada en la app.
class Note {
@@ -36,12 +38,16 @@ class Note {
DateTime? createdAt,
DateTime? updatedAt,
double? position,
String? categoryId,
Object? categoryId = _unsetCategoryId,
int? serverVersion,
bool? isDeleted,
bool? isPermanentlyDeleted,
bool? isDirty,
}) {
final String? resolvedCategoryId = identical(categoryId, _unsetCategoryId)
? this.categoryId
: categoryId as String?;
return Note(
id: id ?? this.id,
title: title ?? this.title,
@@ -49,7 +55,7 @@ class Note {
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
position: position ?? this.position,
categoryId: categoryId ?? this.categoryId,
categoryId: resolvedCategoryId,
serverVersion: serverVersion ?? this.serverVersion,
isDeleted: isDeleted ?? this.isDeleted,
isPermanentlyDeleted: isPermanentlyDeleted ?? this.isPermanentlyDeleted,