How to show both drawer button and back button in Flutter app?

6.3k Views Asked by At

For faster navigation to root pages in deep navigation, both Back and Drawer icon buttons need to be shown in AppBar.

enter image description here

How to do that in a Flutter app?

1

There are 1 best solutions below

2
On

Wrap your toolbar widget with Row

....
Row toolbar = new Row(
  children: <Widget>[
    new Icon(Icons.arrow_back),
    new Icon(Icons.menu),
    new Expanded(child: new Text(widget.title)),
    new Icon(Icons.arrow_forward)
  ]
);

return new Scaffold(
  appBar: new AppBar(
    title: toolbar,
  ),
....

Here it is the result enter image description here