IconButtons の行をすべて並べて配置したいのですが、実際のアイコンと IconButton の制限の間にかなり大きなパディングがあるようです。ボタンのパディングはすでに 0 に設定しています。
これは私のコンポーネントで、かなり簡単です:
class ActionButtons extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.lightBlue,
margin: const EdgeInsets.all(0.0),
padding: const EdgeInsets.all(0.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
IconButton(
icon: new Icon(ScanrIcons.reg),
alignment: Alignment.center,
padding: new EdgeInsets.all(0.0),
onPressed: () {},
),
IconButton(
icon: new Icon(Icons.volume_up),
alignment: Alignment.center,
padding: new EdgeInsets.all(0.0),
onPressed: () {},
)
],
),
);
}
}
水色のスペースのほとんどを取り除き、アイコンを左側で早く開始し、互いに近づけたいのですが、IconButton 自体のサイズを変更する方法が見つかりません。
このスペースはボタン自体によって占められているとほぼ確信しています。なぜなら、配置を変更するcenterRight
と、次のcenterLeft
ようになるからです。
実際のアイコンを小さくしても役に立ちません。ボタンはまだ大きいです。
助けてくれてありがとう