MarkdownEditor: Remove undo/redo poc

Figured out a better way to do, and it's better if this is in a separate
class as it needs to be reused with different editors.
This commit is contained in:
Vishesh Handa
2021-02-02 16:22:09 +01:00
parent b9d765f726
commit 8c3abe7b65

View File

@ -67,8 +67,6 @@ class MarkdownEditorState extends State<MarkdownEditor>
bool _noteModified;
var prevVersion = <String>[];
MarkdownEditorState(this.note) {
_textController = TextEditingController(text: note.body);
_titleTextController = TextEditingController(text: note.title);
@ -79,18 +77,6 @@ class MarkdownEditorState extends State<MarkdownEditor>
void initState() {
super.initState();
_noteModified = widget.noteModified;
_textController.addListener(() {
var text = _textController.text;
prevVersion.add(text);
print("Text");
// The patch computation which is done for memory saving is expensive
// and will need to be done in another thread
// For now just keep it here
// So how do we implement this?
});
}
@override