Reputation: 7216
I place thee IconButtons in the first Expanded. But they takes too much space around them. How to place them closer to each other?
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
iconSize: 10,
icon: FaIcon(FontAwesomeIcons.plus),
onPressed: null,
),
IconButton(
iconSize: 10,
icon: FaIcon(FontAwesomeIcons.asterisk),
onPressed: null,
),
IconButton(
iconSize: 10,
icon: FaIcon(FontAwesomeIcons.hashtag),
onPressed: null,
),
],
),
),
Expanded(...),
Expanded(...),
],
)
],
);
Upvotes: 0
Views: 114
Reputation: 795
You can try this:
AspectRatio(
aspectRatio: 1,
child: IconButton(
icon: Icon(Icons.ac_unit),
onPressed: () {},
),
);
Upvotes: 2
Reputation: 3072
You could use RawMaterialButtons, then you use the BoxConstraints to set the size around it, look this aswer: https://stackoverflow.com/a/54963347/2831595
Upvotes: 2