How to remove extra padding around AppBar leading icon in Flutter
You can't do this because it is a predefined widget. You can, however, do this:
appBar: AppBar(
automaticallyImplyLeading: false, // Don't show the leading button
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
IconButton(
onPressed: () => Navigator.pop(context),
icon: Icon(Icons.arrow_back, color: Colors.white),
),
// Your widgets here
],
),
),
Where automaticallyImplyLeading: true
hides the leading IconButton
so you can add your own widgets.
Just add a property called titleSpacing,
Sample
appBar: AppBar(
leading: Icon(Icons.android),
titleSpacing: 0,
title: Text(widget.title),
),