From dae3d1aec936bbd5eac024ba0d7d4ff2749f4341 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 28 Feb 2020 12:34:56 +0100 Subject: [PATCH] Remove the FAB Fixes #58 I've tried adding a black space under the FAB, but that just reduces the available vertical space while typing. This does reduce the usability for small notes, as clicking on the FAB is much easier than clicking on top-right back button or clicking the back button twice on Android. --- lib/editors/checklist_editor.dart | 1 - lib/editors/common.dart | 9 --------- lib/editors/markdown_editor.dart | 1 - lib/editors/raw_editor.dart | 1 - lib/widgets/note_viewer.dart | 1 - 5 files changed, 13 deletions(-) diff --git a/lib/editors/checklist_editor.dart b/lib/editors/checklist_editor.dart index 93049d5f..444a5b52 100644 --- a/lib/editors/checklist_editor.dart +++ b/lib/editors/checklist_editor.dart @@ -121,7 +121,6 @@ class ChecklistEditorState extends State return Scaffold( appBar: buildEditorAppBar(widget, this), - floatingActionButton: buildFAB(widget, this), body: Column( children: [ if (widget.note.canHaveMetadata) titleEditor, diff --git a/lib/editors/common.dart b/lib/editors/common.dart index 28da611a..93f58fa3 100644 --- a/lib/editors/common.dart +++ b/lib/editors/common.dart @@ -85,12 +85,3 @@ AppBar buildEditorAppBar( ], ); } - -FloatingActionButton buildFAB(Editor editor, EditorState editorState) { - return FloatingActionButton( - child: const Icon(Icons.check), - onPressed: () { - editor.exitEditorSelected(editorState.getNote()); - }, - ); -} diff --git a/lib/editors/markdown_editor.dart b/lib/editors/markdown_editor.dart index 392791bf..c623cf7b 100644 --- a/lib/editors/markdown_editor.dart +++ b/lib/editors/markdown_editor.dart @@ -87,7 +87,6 @@ class MarkdownEditorState extends State implements EditorState { return Scaffold( appBar: buildEditorAppBar(widget, this, extraButtons: [extraButton]), - floatingActionButton: buildFAB(widget, this), body: body, ); } diff --git a/lib/editors/raw_editor.dart b/lib/editors/raw_editor.dart index 68f2ab7c..ebfddae9 100644 --- a/lib/editors/raw_editor.dart +++ b/lib/editors/raw_editor.dart @@ -70,7 +70,6 @@ class RawEditorState extends State implements EditorState { return Scaffold( appBar: buildEditorAppBar(widget, this), - floatingActionButton: buildFAB(widget, this), body: editor, ); } diff --git a/lib/widgets/note_viewer.dart b/lib/widgets/note_viewer.dart index cf5ef92e..6e3392f2 100644 --- a/lib/widgets/note_viewer.dart +++ b/lib/widgets/note_viewer.dart @@ -60,7 +60,6 @@ class NoteViewer extends StatelessWidget { }, ), ), - const SizedBox(height: 64.0), // _buildFooter(context), ], crossAxisAlignment: CrossAxisAlignment.start,