Kyaw Tun
Kyaw Tun

Reputation: 13131

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

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?

Upvotes: 10

Views: 6575

Answers (1)

Putra Ardiansyah
Putra Ardiansyah

Reputation: 5863

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

Upvotes: 3

Related Questions