From 949a7e6662b09763c636283e958f0485251381a4 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sat, 15 Aug 2020 12:23:43 +0200 Subject: [PATCH] Editor: Don't use the BottomAppBar The BottomAppBar has a SafeArea widget inside which seems to give it an extra top padding on my phone (OnePlus), I'm not sure why it thinks this extra top padding is required. Maybe this workaround will fail on other devices --- lib/editors/common.dart | 50 +++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/lib/editors/common.dart b/lib/editors/common.dart index e553b5f8..49fde6a1 100644 --- a/lib/editors/common.dart +++ b/lib/editors/common.dart @@ -133,32 +133,34 @@ class EditorBottomBar extends StatelessWidget { }, ); - return BottomAppBar( - elevation: 0.0, + return Container( color: Theme.of(context).scaffoldBackgroundColor, - child: Row( - children: [ - Visibility( - child: addIcon, - visible: allowEdits, - maintainSize: true, - maintainAnimation: true, - maintainState: true, - maintainInteractivity: false, - ), - Expanded( - child: FlatButton.icon( - icon: const Icon(Icons.folder), - label: Text(parentFolder.publicName), - onPressed: () { - var note = editorState.getNote(); - editor.moveNoteToFolderSelected(note); - }, + child: SafeArea( + top: false, + child: Row( + children: [ + Visibility( + child: addIcon, + visible: allowEdits, + maintainSize: true, + maintainAnimation: true, + maintainState: true, + maintainInteractivity: false, ), - ), - menuIcon, - ], - mainAxisAlignment: MainAxisAlignment.center, + Expanded( + child: FlatButton.icon( + icon: const Icon(Icons.folder), + label: Text(parentFolder.publicName), + onPressed: () { + var note = editorState.getNote(); + editor.moveNoteToFolderSelected(note); + }, + ), + ), + menuIcon, + ], + mainAxisAlignment: MainAxisAlignment.center, + ), ), ); }