mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
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
This commit is contained in:
@ -133,32 +133,34 @@ class EditorBottomBar extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
|
||||
return BottomAppBar(
|
||||
elevation: 0.0,
|
||||
return Container(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
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: <Widget>[
|
||||
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,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user