From c403f112c9cc4adbbb19ad4fa6b9a5f211e97fb2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:19:10 +0000 Subject: [PATCH 1/4] chore(deps): require flutter_checklist 2.1.0 Version 2.1.0 adds the toggleable option. pubspec.lock is to be updated once it is published. Refs #510 Co-Authored-By: Claude --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index a3bb35b9..e0a0ec65 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: flex_color_picker: ^3.8.0 flutter: sdk: flutter - flutter_checklist: ^2.0.0 + flutter_checklist: ^2.1.0 flutter_displaymode: ^0.7.0 flutter_expandable_fab: ^2.5.2 flutter_fgbg: ^0.8.0 From f29691e1674f3e13dce887a7f4c9bd181b5f07e7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 01:19:10 +0000 Subject: [PATCH 2/4] feat(editor): toggle the checklist items in the reading mode Checking an item is not really editing a note, so the checkboxes of a checklist note stay active in the reading mode, while the texts, the order and the items stay read only. They are never active in the bin. The change is saved like any edit (also when the editor is left right away), and updates the modification date. Refs #510 Co-Authored-By: Claude --- lib/pages/editor/editor_page.dart | 2 ++ lib/pages/editor/widgets/editors/checklist_editor.dart | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/lib/pages/editor/editor_page.dart b/lib/pages/editor/editor_page.dart index 21b9959d..7336fc0d 100644 --- a/lib/pages/editor/editor_page.dart +++ b/lib/pages/editor/editor_page.dart @@ -182,6 +182,8 @@ class _EditorState extends ConsumerState { note: note, isNewNote: widget.isNewNote, readOnly: readOnly, + // Checking an item is not editing the note: allow it in the reading mode, but never in the bin + toggleable: !currentNote.deleted, onChanged: scheduleSave, ); } diff --git a/lib/pages/editor/widgets/editors/checklist_editor.dart b/lib/pages/editor/widgets/editors/checklist_editor.dart index 200b8dab..c31534bb 100644 --- a/lib/pages/editor/widgets/editors/checklist_editor.dart +++ b/lib/pages/editor/widgets/editors/checklist_editor.dart @@ -12,6 +12,7 @@ class ChecklistEditor extends ConsumerStatefulWidget { required this.note, required this.isNewNote, required this.readOnly, + required this.toggleable, required this.onChanged, }); @@ -24,6 +25,9 @@ class ChecklistEditor extends ConsumerStatefulWidget { /// Whether the text fields are read only. final bool readOnly; + /// Whether the checkboxes can be toggled even when the editor is [readOnly] (in the reading mode). + final bool toggleable; + /// Called when the note has changed. final ValueChanged onChanged; @@ -50,6 +54,7 @@ class _ChecklistEditorState extends ConsumerState { child: Checklist( lines: widget.note.checklistLines, enabled: !widget.readOnly, + toggleable: widget.toggleable, autofocusFirstLine: widget.isNewNote, textInputAction: TextInputAction.newline, textCapitalization: TextCapitalization.sentences, From b4df11aeaa741dac305c32e6e56d19f85c2e393c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 10:09:33 +0000 Subject: [PATCH 3/4] chore(deps): lock flutter_checklist 2.1.0 Refs #510 Co-Authored-By: Claude --- pubspec.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 275ddafe..3451bdfb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -426,10 +426,10 @@ packages: dependency: "direct main" description: name: flutter_checklist - sha256: "05535250455c0810db377ee86e34b0065bd039ededf198b726366bf70a8ccee6" + sha256: f3b836bfe8eeefd8222aa8f6170e2f7b57eb004439d22e95e896a627b334e0d9 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" flutter_displaymode: dependency: "direct main" description: From 54f757586f253b97708bea6df0a33c977080c197 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 10:09:34 +0000 Subject: [PATCH 4/4] feat(editor): reorder the checklist items in the reading mode Like checking an item, moving it is not editing its text, so the items of a checklist note can be dragged in the reading mode. Never in the bin. Refs #510 Co-Authored-By: Claude --- lib/pages/editor/editor_page.dart | 4 +++- lib/pages/editor/widgets/editors/checklist_editor.dart | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/pages/editor/editor_page.dart b/lib/pages/editor/editor_page.dart index 7336fc0d..ed053f80 100644 --- a/lib/pages/editor/editor_page.dart +++ b/lib/pages/editor/editor_page.dart @@ -182,8 +182,10 @@ class _EditorState extends ConsumerState { note: note, isNewNote: widget.isNewNote, readOnly: readOnly, - // Checking an item is not editing the note: allow it in the reading mode, but never in the bin + // Checking and moving the items is not editing their texts: allow it in the reading mode, but never in + // the bin toggleable: !currentNote.deleted, + reorderable: !currentNote.deleted, onChanged: scheduleSave, ); } diff --git a/lib/pages/editor/widgets/editors/checklist_editor.dart b/lib/pages/editor/widgets/editors/checklist_editor.dart index c31534bb..fce185a5 100644 --- a/lib/pages/editor/widgets/editors/checklist_editor.dart +++ b/lib/pages/editor/widgets/editors/checklist_editor.dart @@ -13,6 +13,7 @@ class ChecklistEditor extends ConsumerStatefulWidget { required this.isNewNote, required this.readOnly, required this.toggleable, + required this.reorderable, required this.onChanged, }); @@ -28,6 +29,9 @@ class ChecklistEditor extends ConsumerStatefulWidget { /// Whether the checkboxes can be toggled even when the editor is [readOnly] (in the reading mode). final bool toggleable; + /// Whether the items can be reordered even when the editor is [readOnly] (in the reading mode). + final bool reorderable; + /// Called when the note has changed. final ValueChanged onChanged; @@ -55,6 +59,7 @@ class _ChecklistEditorState extends ConsumerState { lines: widget.note.checklistLines, enabled: !widget.readOnly, toggleable: widget.toggleable, + reorderable: widget.reorderable, autofocusFirstLine: widget.isNewNote, textInputAction: TextInputAction.newline, textCapitalization: TextCapitalization.sentences,