どうも、ちょげ(@chogetarou)です。
アイコンボタンのパディングを0にする方法を紹介します。
方法

アイコンボタンのパディングを0にするには、まず引数「padding」に「EdgeInsets.zero」を指定します。
そして、引数「constraints」に空の「BoxConstraints」クラスを指定します。
IconButton(
padding: EdgeInsets.zero,
onPressed: () {},
constraints: BoxConstraints(),
icon: Icon(Icons.flutter_dash),
)
コメント