I'm trying to change the background color only of the icon that is on the leading of the native AppBar of flutter, but I don't know how, does anyone know if it's possible?
I'm trying to change the background color only of the icon that is on the leading of the native AppBar of flutter, but I don't know how, does anyone know if it's possible?
If you are using flutter 3.3, you could do like:
Material(
color: Colors.redAccent,
child: IconButton(
onPressed: () {},
icon: const Icon(Icons.search),
),
),
This apparently solves my initial problem
leading: IconButton(
onPressed: () {...},
icon: Container(
color: Colors.white,
child: const Icon(
Icons.arrow_back,
color: Colors.black,
),
),
),