Search code examples
androidflutterdartflutter-appbar

Change AppBar back icon size in Flutter


Here's the current AppBar code:

AppBar(
  iconTheme: IconThemeData(
    color: Colors.black,
    size: 100 // This isn't performing any changes
  ),
  centerTitle: false,
  backgroundColor: Colors.white,
  title: Text(
    title,
    style: TextStyle(color: Colors.black87,

  ),
  elevation: 1.0,
);

Current size attribute from IconThemeData not making any change.


Solution

  • Try this you need to use leading

    • A widget to display before the title.

    SAMPLE CODE

     AppBar(
          title: new Text("Your Title"),
          leading: new IconButton(
            icon: new Icon(Icons.arrow_back,size: 50.0,),
            onPressed: () => {
              // Perform Your action here
            },
          ),
        );
    

    OUTPUT

    enter image description here