mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
Editor: Show ✕ or ✓ in AppBar depending on if the note has been modified
Fixes #123
This commit is contained in:
@ -10,6 +10,7 @@ import 'package:gitjournal/editors/note_title_editor.dart';
|
|||||||
|
|
||||||
class ChecklistEditor extends StatefulWidget implements Editor {
|
class ChecklistEditor extends StatefulWidget implements Editor {
|
||||||
final Note note;
|
final Note note;
|
||||||
|
final bool noteModified;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final NoteCallback noteDeletionSelected;
|
final NoteCallback noteDeletionSelected;
|
||||||
@ -29,6 +30,7 @@ class ChecklistEditor extends StatefulWidget implements Editor {
|
|||||||
ChecklistEditor({
|
ChecklistEditor({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.note,
|
@required this.note,
|
||||||
|
@required this.noteModified,
|
||||||
@required this.noteDeletionSelected,
|
@required this.noteDeletionSelected,
|
||||||
@required this.noteEditorChooserSelected,
|
@required this.noteEditorChooserSelected,
|
||||||
@required this.exitEditorSelected,
|
@required this.exitEditorSelected,
|
||||||
@ -49,6 +51,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
Checklist checklist;
|
Checklist checklist;
|
||||||
var focusNodes = <ChecklistItem, FocusScopeNode>{};
|
var focusNodes = <ChecklistItem, FocusScopeNode>{};
|
||||||
TextEditingController _titleTextController = TextEditingController();
|
TextEditingController _titleTextController = TextEditingController();
|
||||||
|
bool _noteModified;
|
||||||
|
|
||||||
ChecklistEditorState(Note note) {
|
ChecklistEditorState(Note note) {
|
||||||
_titleTextController = TextEditingController(text: note.title);
|
_titleTextController = TextEditingController(text: note.title);
|
||||||
@ -58,6 +61,8 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_noteModified = widget.noteModified;
|
||||||
|
|
||||||
if (checklist.items.isEmpty) {
|
if (checklist.items.isEmpty) {
|
||||||
var item = checklist.buildItem(false, "");
|
var item = checklist.buildItem(false, "");
|
||||||
checklist.addItem(item);
|
checklist.addItem(item);
|
||||||
@ -85,6 +90,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
itemTiles.add(AddItemButton(
|
itemTiles.add(AddItemButton(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
_noteTextChanged();
|
||||||
setState(() {
|
setState(() {
|
||||||
var fn = FocusScopeNode();
|
var fn = FocusScopeNode();
|
||||||
var item = checklist.buildItem(false, "");
|
var item = checklist.buildItem(false, "");
|
||||||
@ -102,6 +108,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
Widget checklistWidget = ReorderableListView(
|
Widget checklistWidget = ReorderableListView(
|
||||||
children: itemTiles,
|
children: itemTiles,
|
||||||
onReorder: (int oldIndex, int newIndex) {
|
onReorder: (int oldIndex, int newIndex) {
|
||||||
|
_noteTextChanged();
|
||||||
setState(() {
|
setState(() {
|
||||||
var item = checklist.removeAt(oldIndex);
|
var item = checklist.removeAt(oldIndex);
|
||||||
|
|
||||||
@ -116,11 +123,11 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
|
|
||||||
var titleEditor = Padding(
|
var titleEditor = Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
|
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
|
||||||
child: NoteTitleEditor(_titleTextController),
|
child: NoteTitleEditor(_titleTextController, _noteTextChanged),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: buildEditorAppBar(widget, this),
|
appBar: buildEditorAppBar(widget, this, noteModified: _noteModified),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (widget.note.canHaveMetadata) titleEditor,
|
if (widget.note.canHaveMetadata) titleEditor,
|
||||||
@ -138,6 +145,13 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
return note;
|
return note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _noteTextChanged() {
|
||||||
|
if (_noteModified) return;
|
||||||
|
setState(() {
|
||||||
|
_noteModified = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ChecklistItemTile _buildTile(ChecklistItem item, int index, bool autofocus) {
|
ChecklistItemTile _buildTile(ChecklistItem item, int index, bool autofocus) {
|
||||||
return ChecklistItemTile(
|
return ChecklistItemTile(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
@ -148,11 +162,14 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
setState(() {
|
setState(() {
|
||||||
item.checked = newVal;
|
item.checked = newVal;
|
||||||
});
|
});
|
||||||
|
_noteTextChanged();
|
||||||
},
|
},
|
||||||
textChanged: (String newVal) {
|
textChanged: (String newVal) {
|
||||||
item.text = newVal;
|
item.text = newVal;
|
||||||
|
_noteTextChanged();
|
||||||
},
|
},
|
||||||
itemRemoved: () {
|
itemRemoved: () {
|
||||||
|
_noteTextChanged();
|
||||||
setState(() {
|
setState(() {
|
||||||
// Give next item the focus
|
// Give next item the focus
|
||||||
var nextIndex = index + 1;
|
var nextIndex = index + 1;
|
||||||
@ -180,6 +197,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
itemFinished: () {
|
itemFinished: () {
|
||||||
|
_noteTextChanged();
|
||||||
setState(() {
|
setState(() {
|
||||||
var fn = FocusScopeNode();
|
var fn = FocusScopeNode();
|
||||||
var item = checklist.buildItem(false, "");
|
var item = checklist.buildItem(false, "");
|
||||||
|
@ -21,12 +21,13 @@ enum DropDownChoices { Rename, MoveToFolder, DiscardChanges }
|
|||||||
AppBar buildEditorAppBar(
|
AppBar buildEditorAppBar(
|
||||||
Editor editor,
|
Editor editor,
|
||||||
EditorState editorState, {
|
EditorState editorState, {
|
||||||
|
@required bool noteModified,
|
||||||
List<IconButton> extraButtons,
|
List<IconButton> extraButtons,
|
||||||
}) {
|
}) {
|
||||||
return AppBar(
|
return AppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
key: const ValueKey("NewEntry"),
|
key: const ValueKey("NewEntry"),
|
||||||
icon: const Icon(Icons.check),
|
icon: Icon(noteModified ? Icons.check : Icons.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
editor.exitEditorSelected(editorState.getNote());
|
editor.exitEditorSelected(editorState.getNote());
|
||||||
},
|
},
|
||||||
|
@ -6,6 +6,7 @@ import 'package:gitjournal/widgets/journal_editor_header.dart';
|
|||||||
|
|
||||||
class JournalEditor extends StatefulWidget implements Editor {
|
class JournalEditor extends StatefulWidget implements Editor {
|
||||||
final Note note;
|
final Note note;
|
||||||
|
final bool noteModified;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final NoteCallback noteDeletionSelected;
|
final NoteCallback noteDeletionSelected;
|
||||||
@ -25,6 +26,7 @@ class JournalEditor extends StatefulWidget implements Editor {
|
|||||||
JournalEditor({
|
JournalEditor({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.note,
|
@required this.note,
|
||||||
|
@required this.noteModified,
|
||||||
@required this.noteDeletionSelected,
|
@required this.noteDeletionSelected,
|
||||||
@required this.noteEditorChooserSelected,
|
@required this.noteEditorChooserSelected,
|
||||||
@required this.exitEditorSelected,
|
@required this.exitEditorSelected,
|
||||||
@ -43,11 +45,18 @@ class JournalEditor extends StatefulWidget implements Editor {
|
|||||||
class JournalEditorState extends State<JournalEditor> implements EditorState {
|
class JournalEditorState extends State<JournalEditor> implements EditorState {
|
||||||
Note note;
|
Note note;
|
||||||
TextEditingController _textController = TextEditingController();
|
TextEditingController _textController = TextEditingController();
|
||||||
|
bool _noteModified;
|
||||||
|
|
||||||
JournalEditorState(this.note) {
|
JournalEditorState(this.note) {
|
||||||
_textController = TextEditingController(text: note.body);
|
_textController = TextEditingController(text: note.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_noteModified = widget.noteModified;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_textController.dispose();
|
_textController.dispose();
|
||||||
@ -63,8 +72,9 @@ class JournalEditorState extends State<JournalEditor> implements EditorState {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
JournalEditorHeader(note),
|
JournalEditorHeader(note),
|
||||||
_NoteBodyEditor(
|
_NoteBodyEditor(
|
||||||
_textController,
|
textController: _textController,
|
||||||
autofocus: widget.isNewNote,
|
autofocus: widget.isNewNote,
|
||||||
|
onChanged: _noteTextChanged,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -72,7 +82,7 @@ class JournalEditorState extends State<JournalEditor> implements EditorState {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: buildEditorAppBar(widget, this),
|
appBar: buildEditorAppBar(widget, this, noteModified: _noteModified),
|
||||||
body: editor,
|
body: editor,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -83,13 +93,21 @@ class JournalEditorState extends State<JournalEditor> implements EditorState {
|
|||||||
note.type = NoteType.Journal;
|
note.type = NoteType.Journal;
|
||||||
return note;
|
return note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _noteTextChanged() {
|
||||||
|
if (_noteModified) return;
|
||||||
|
setState(() {
|
||||||
|
_noteModified = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _NoteBodyEditor extends StatelessWidget {
|
class _NoteBodyEditor extends StatelessWidget {
|
||||||
final TextEditingController textController;
|
final TextEditingController textController;
|
||||||
final bool autofocus;
|
final bool autofocus;
|
||||||
|
final Function onChanged;
|
||||||
|
|
||||||
_NoteBodyEditor(this.textController, {this.autofocus = false});
|
_NoteBodyEditor({this.textController, this.autofocus, this.onChanged});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -108,6 +126,7 @@ class _NoteBodyEditor extends StatelessWidget {
|
|||||||
controller: textController,
|
controller: textController,
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
scrollPadding: const EdgeInsets.all(0.0),
|
scrollPadding: const EdgeInsets.all(0.0),
|
||||||
|
onChanged: (_) => onChanged(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import 'package:gitjournal/widgets/note_viewer.dart';
|
|||||||
|
|
||||||
class MarkdownEditor extends StatefulWidget implements Editor {
|
class MarkdownEditor extends StatefulWidget implements Editor {
|
||||||
final Note note;
|
final Note note;
|
||||||
|
final bool noteModified;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final NoteCallback noteDeletionSelected;
|
final NoteCallback noteDeletionSelected;
|
||||||
@ -27,6 +28,7 @@ class MarkdownEditor extends StatefulWidget implements Editor {
|
|||||||
MarkdownEditor({
|
MarkdownEditor({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.note,
|
@required this.note,
|
||||||
|
@required this.noteModified,
|
||||||
@required this.noteDeletionSelected,
|
@required this.noteDeletionSelected,
|
||||||
@required this.noteEditorChooserSelected,
|
@required this.noteEditorChooserSelected,
|
||||||
@required this.exitEditorSelected,
|
@required this.exitEditorSelected,
|
||||||
@ -48,6 +50,7 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
|
|||||||
TextEditingController _titleTextController = TextEditingController();
|
TextEditingController _titleTextController = TextEditingController();
|
||||||
|
|
||||||
bool editingMode = true;
|
bool editingMode = true;
|
||||||
|
bool _noteModified;
|
||||||
|
|
||||||
MarkdownEditorState(this.note) {
|
MarkdownEditorState(this.note) {
|
||||||
_textController = TextEditingController(text: note.body);
|
_textController = TextEditingController(text: note.body);
|
||||||
@ -60,6 +63,7 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_noteModified = widget.noteModified;
|
||||||
if (widget.isNewNote) {
|
if (widget.isNewNote) {
|
||||||
editingMode = true;
|
editingMode = true;
|
||||||
}
|
}
|
||||||
@ -79,10 +83,15 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (note.canHaveMetadata) NoteTitleEditor(_titleTextController),
|
if (note.canHaveMetadata)
|
||||||
|
NoteTitleEditor(
|
||||||
|
_titleTextController,
|
||||||
|
_noteTextChanged,
|
||||||
|
),
|
||||||
_NoteBodyEditor(
|
_NoteBodyEditor(
|
||||||
_textController,
|
textController: _textController,
|
||||||
autofocus: widget.isNewNote,
|
autofocus: widget.isNewNote,
|
||||||
|
onChanged: _noteTextChanged,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -99,7 +108,12 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: buildEditorAppBar(widget, this, extraButtons: [extraButton]),
|
appBar: buildEditorAppBar(
|
||||||
|
widget,
|
||||||
|
this,
|
||||||
|
noteModified: _noteModified,
|
||||||
|
extraButtons: [extraButton],
|
||||||
|
),
|
||||||
body: body,
|
body: body,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -122,13 +136,25 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
|
|||||||
_updateNote();
|
_updateNote();
|
||||||
return note;
|
return note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _noteTextChanged() {
|
||||||
|
if (_noteModified) return;
|
||||||
|
setState(() {
|
||||||
|
_noteModified = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _NoteBodyEditor extends StatelessWidget {
|
class _NoteBodyEditor extends StatelessWidget {
|
||||||
final TextEditingController textController;
|
final TextEditingController textController;
|
||||||
final bool autofocus;
|
final bool autofocus;
|
||||||
|
final Function onChanged;
|
||||||
|
|
||||||
_NoteBodyEditor(this.textController, {this.autofocus = false});
|
_NoteBodyEditor({
|
||||||
|
@required this.textController,
|
||||||
|
@required this.autofocus,
|
||||||
|
@required this.onChanged,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -147,6 +173,7 @@ class _NoteBodyEditor extends StatelessWidget {
|
|||||||
controller: textController,
|
controller: textController,
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
scrollPadding: const EdgeInsets.all(0.0),
|
scrollPadding: const EdgeInsets.all(0.0),
|
||||||
|
onChanged: (_) => onChanged(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,9 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class NoteTitleEditor extends StatelessWidget {
|
class NoteTitleEditor extends StatelessWidget {
|
||||||
final TextEditingController textController;
|
final TextEditingController textController;
|
||||||
|
final Function onChanged;
|
||||||
|
|
||||||
NoteTitleEditor(this.textController);
|
NoteTitleEditor(this.textController, this.onChanged);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -20,6 +21,7 @@ class NoteTitleEditor extends StatelessWidget {
|
|||||||
controller: textController,
|
controller: textController,
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
onChanged: (_) => onChanged(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import 'package:gitjournal/editors/common.dart';
|
|||||||
|
|
||||||
class RawEditor extends StatefulWidget implements Editor {
|
class RawEditor extends StatefulWidget implements Editor {
|
||||||
final Note note;
|
final Note note;
|
||||||
|
final bool noteModified;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final NoteCallback noteDeletionSelected;
|
final NoteCallback noteDeletionSelected;
|
||||||
@ -25,6 +26,7 @@ class RawEditor extends StatefulWidget implements Editor {
|
|||||||
RawEditor({
|
RawEditor({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.note,
|
@required this.note,
|
||||||
|
@required this.noteModified,
|
||||||
@required this.noteDeletionSelected,
|
@required this.noteDeletionSelected,
|
||||||
@required this.noteEditorChooserSelected,
|
@required this.noteEditorChooserSelected,
|
||||||
@required this.exitEditorSelected,
|
@required this.exitEditorSelected,
|
||||||
@ -42,6 +44,7 @@ class RawEditor extends StatefulWidget implements Editor {
|
|||||||
|
|
||||||
class RawEditorState extends State<RawEditor> implements EditorState {
|
class RawEditorState extends State<RawEditor> implements EditorState {
|
||||||
Note note;
|
Note note;
|
||||||
|
bool _noteModified;
|
||||||
TextEditingController _textController = TextEditingController();
|
TextEditingController _textController = TextEditingController();
|
||||||
|
|
||||||
final serializer = MarkdownYAMLCodec();
|
final serializer = MarkdownYAMLCodec();
|
||||||
@ -50,6 +53,12 @@ class RawEditorState extends State<RawEditor> implements EditorState {
|
|||||||
_textController = TextEditingController(text: serializer.encode(note.data));
|
_textController = TextEditingController(text: serializer.encode(note.data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_noteModified = widget.noteModified;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_textController.dispose();
|
_textController.dispose();
|
||||||
@ -62,14 +71,15 @@ class RawEditorState extends State<RawEditor> implements EditorState {
|
|||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: _NoteEditor(
|
child: _NoteEditor(
|
||||||
_textController,
|
textController: _textController,
|
||||||
autofocus: widget.isNewNote,
|
autofocus: widget.isNewNote,
|
||||||
|
onChanged: _noteTextChanged,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: buildEditorAppBar(widget, this),
|
appBar: buildEditorAppBar(widget, this, noteModified: _noteModified),
|
||||||
body: editor,
|
body: editor,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -79,13 +89,21 @@ class RawEditorState extends State<RawEditor> implements EditorState {
|
|||||||
note.data = serializer.decode(_textController.text);
|
note.data = serializer.decode(_textController.text);
|
||||||
return note;
|
return note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _noteTextChanged() {
|
||||||
|
if (_noteModified) return;
|
||||||
|
setState(() {
|
||||||
|
_noteModified = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _NoteEditor extends StatelessWidget {
|
class _NoteEditor extends StatelessWidget {
|
||||||
final TextEditingController textController;
|
final TextEditingController textController;
|
||||||
final bool autofocus;
|
final bool autofocus;
|
||||||
|
final Function onChanged;
|
||||||
|
|
||||||
_NoteEditor(this.textController, {this.autofocus = false});
|
_NoteEditor({this.textController, this.autofocus, this.onChanged});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -105,6 +123,7 @@ class _NoteEditor extends StatelessWidget {
|
|||||||
controller: textController,
|
controller: textController,
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
scrollPadding: const EdgeInsets.all(0.0),
|
scrollPadding: const EdgeInsets.all(0.0),
|
||||||
|
onChanged: (_) => onChanged(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ class NoteEditorState extends State<NoteEditor> {
|
|||||||
return MarkdownEditor(
|
return MarkdownEditor(
|
||||||
key: _markdownEditorKey,
|
key: _markdownEditorKey,
|
||||||
note: note,
|
note: note,
|
||||||
|
noteModified: _noteModified(note),
|
||||||
noteDeletionSelected: _noteDeletionSelected,
|
noteDeletionSelected: _noteDeletionSelected,
|
||||||
noteEditorChooserSelected: _noteEditorChooserSelected,
|
noteEditorChooserSelected: _noteEditorChooserSelected,
|
||||||
exitEditorSelected: _exitEditorSelected,
|
exitEditorSelected: _exitEditorSelected,
|
||||||
@ -108,6 +109,7 @@ class NoteEditorState extends State<NoteEditor> {
|
|||||||
return RawEditor(
|
return RawEditor(
|
||||||
key: _rawEditorKey,
|
key: _rawEditorKey,
|
||||||
note: note,
|
note: note,
|
||||||
|
noteModified: _noteModified(note),
|
||||||
noteDeletionSelected: _noteDeletionSelected,
|
noteDeletionSelected: _noteDeletionSelected,
|
||||||
noteEditorChooserSelected: _noteEditorChooserSelected,
|
noteEditorChooserSelected: _noteEditorChooserSelected,
|
||||||
exitEditorSelected: _exitEditorSelected,
|
exitEditorSelected: _exitEditorSelected,
|
||||||
@ -120,6 +122,7 @@ class NoteEditorState extends State<NoteEditor> {
|
|||||||
return ChecklistEditor(
|
return ChecklistEditor(
|
||||||
key: _checklistEditorKey,
|
key: _checklistEditorKey,
|
||||||
note: note,
|
note: note,
|
||||||
|
noteModified: _noteModified(note),
|
||||||
noteDeletionSelected: _noteDeletionSelected,
|
noteDeletionSelected: _noteDeletionSelected,
|
||||||
noteEditorChooserSelected: _noteEditorChooserSelected,
|
noteEditorChooserSelected: _noteEditorChooserSelected,
|
||||||
exitEditorSelected: _exitEditorSelected,
|
exitEditorSelected: _exitEditorSelected,
|
||||||
@ -132,6 +135,7 @@ class NoteEditorState extends State<NoteEditor> {
|
|||||||
return JournalEditor(
|
return JournalEditor(
|
||||||
key: _journalEditorKey,
|
key: _journalEditorKey,
|
||||||
note: note,
|
note: note,
|
||||||
|
noteModified: _noteModified(note),
|
||||||
noteDeletionSelected: _noteDeletionSelected,
|
noteDeletionSelected: _noteDeletionSelected,
|
||||||
noteEditorChooserSelected: _noteEditorChooserSelected,
|
noteEditorChooserSelected: _noteEditorChooserSelected,
|
||||||
exitEditorSelected: _exitEditorSelected,
|
exitEditorSelected: _exitEditorSelected,
|
||||||
|
Reference in New Issue
Block a user