How to padding IconButton with click effect correctly?

Viewed 2625

I am new in flutter. And I try to demo app. I need a IconButton on appBar and I create it. But I set padding to IconButon and icon position changed but click wave effect not changed with iconButton.

I want to correctly set padding to IconButton.

Here is my appBar :

  appBar: new AppBar(
    title: new Text('Demo App'),
    actions: <Widget>[
      IconButton(
        icon: new Icon(Icons.dehaze, size:45.0, ),
        padding: const EdgeInsets.only(right: 40.0),
        alignment: Alignment.center,
        tooltip: 'Air it',
        onPressed: (){},
    ),
    ],
  ),
1 Answers

Set your icon size in IconButton widget instead of Icon. This way IconButton will recognize the resized icon and do the magic for you.

 IconButton(
   iconSize: 45,
   icon: new Icon(Icons.dehaze),
   tooltip: 'Air it',
   onPressed: (){},
 ),
Related