Quantcast
Channel: Resize leading widget in flutter AppBar - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by Raffi Jonas for Resize leading widget in flutter AppBar

$
0
0

You cant because it is a predefined widget.

You can work around it with a Row widget:

Scaffold(key:_scaffoldKey,drawer: Drawer(),appBar: AppBar(      automaticallyImplyLeading: false      title: Row(        mainAxisAlignment: MainAxisAlignment.start,        crossAxisAlignment: CrossAxisAlignment.center,        children: <Widget>[          SizedBox(              height: 20, // Your Height              width: 20, // Your width              child: IconButton( // Your drawer Icon                       onPressed: () => _scaffoldKey.currentState.openDrawer()),                      icon: Icon(Icons.arrow_back, color: Colors.white),          ),)          // Your widgets here        ],      ),    ),)

You need the Key to open the drawer with _scaffoldKey.currentState.openDrawer().

automaticallyImplyLeading: false will prevent the default drawer Icon.


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>