diff --git a/lib/widgets/note_tag_editor.dart b/lib/widgets/note_tag_editor.dart index 9a18e5fc..2c8bd3a9 100644 --- a/lib/widgets/note_tag_editor.dart +++ b/lib/widgets/note_tag_editor.dart @@ -14,6 +14,7 @@ class NoteTagEditor extends StatefulWidget { class _NoteTagEditorState extends State { TextEditingController _textController; + FocusNode _focusNode; Set _selectedTags; Set _allTags; @@ -24,6 +25,7 @@ class _NoteTagEditorState extends State { _selectedTags = Set.from(widget.selectedTags); _allTags = Set.from(widget.allTags); + _focusNode = FocusNode(); _textController = TextEditingController(); _textController.addListener(() { setState(() {}); @@ -43,6 +45,7 @@ class _NoteTagEditorState extends State { }, ), title: TextField( + focusNode: _focusNode, controller: _textController, style: theme.textTheme.headline6, decoration: InputDecoration( @@ -53,6 +56,12 @@ class _NoteTagEditorState extends State { ), ), body: buildView(_textController.text), + floatingActionButton: FloatingActionButton( + child: const Icon(Icons.add), + onPressed: () { + _focusNode.requestFocus(); + }, + ), ); return WillPopScope(