From 8c3abe7b653ebaadd41d2a6307b7cc30b2a0cdc7 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Tue, 2 Feb 2021 16:22:09 +0100 Subject: [PATCH] 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. --- lib/editors/markdown_editor.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/editors/markdown_editor.dart b/lib/editors/markdown_editor.dart index a2c97ee4..d35b5da0 100644 --- a/lib/editors/markdown_editor.dart +++ b/lib/editors/markdown_editor.dart @@ -67,8 +67,6 @@ class MarkdownEditorState extends State bool _noteModified; - var prevVersion = []; - MarkdownEditorState(this.note) { _textController = TextEditingController(text: note.body); _titleTextController = TextEditingController(text: note.title); @@ -79,18 +77,6 @@ class MarkdownEditorState extends State 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