From f129f2ac94e825b978f9c735ef2e110e2bfb6664 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Tue, 5 May 2020 10:10:56 +0200 Subject: [PATCH] Editor: Bring back 'Move to Folder' in the dropdown menu I cannot seem to position the BottomAppBar on top of the keyboard, and until I can do that lets keep this action over here. https://github.com/flutter/flutter/issues/26499 --- lib/editors/common.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/editors/common.dart b/lib/editors/common.dart index 51f27b24..17e8f78f 100644 --- a/lib/editors/common.dart +++ b/lib/editors/common.dart @@ -17,7 +17,7 @@ abstract class EditorState { Note getNote(); } -enum DropDownChoices { Rename, DiscardChanges, Share } +enum DropDownChoices { Rename, MoveToFolder, DiscardChanges, Share } AppBar buildEditorAppBar( Editor editor, @@ -58,6 +58,11 @@ AppBar buildEditorAppBar( editor.renameNoteSelected(note); return; + case DropDownChoices.MoveToFolder: + var note = editorState.getNote(); + editor.moveNoteToFolderSelected(note); + return; + case DropDownChoices.DiscardChanges: var note = editorState.getNote(); editor.discardChangesSelected(note); @@ -75,6 +80,10 @@ AppBar buildEditorAppBar( value: DropDownChoices.Rename, child: Text('Edit File Name'), ), + const PopupMenuItem( + value: DropDownChoices.MoveToFolder, + child: Text('Move to Folder'), + ), const PopupMenuItem( value: DropDownChoices.DiscardChanges, child: Text('Discard Changes'),