How to create button on the left in Appbar [flutter]

Issue

I tried to make the button[that pop new screen]on the left of the app-bar but I found only drawer that is not what I want.

what I want in AppBar:

------------------------------------------------<br>
| button |----------text----------| button |<br>
------------------------------------------------<br>

what I have now:

------------------------------------------------<br>
----------------text----------------| button | <- form actions in AppBar<br>
------------------------------------------------<br>

Solution

If I understand correctly, you want to add a left button to your AppBar. You can achieve that by using the leading property, like this:

AppBar(
  title: Text("AppBar with leading button"),
  automaticallyImplyLeading: false,
  leading: IconButton (
                 icon: Icon(Icons.arrow_back), 
                 onPressed: () { 
                       /** Do something */ 
                 },
            ),
)

Answered By – Eduardo

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *