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
+21
View File
@@ -0,0 +1,21 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:notas/models/note.dart';
void main() {
test('copyWith can clear categoryId explicitly', () {
final Note note = Note(
title: 'A',
body: 'B',
createdAt: DateTime(2026, 5, 21),
updatedAt: DateTime(2026, 5, 21),
position: 0,
categoryId: 'cat-1',
);
final Note cleared = note.copyWith(categoryId: null);
expect(cleared.categoryId, isNull);
expect(cleared.id, note.id);
});
}