我有一个IconButton
,想堆叠两个看起来像的图标
我尝试使用Row
这样的布局
CircleAvatar(
radius: avatarRadius,
child: IconButton(
icon: Row(
children: [
Icon(
Icons.add,
color: Colors.white,
),
Icon(
Icons.message,
color: Colors.white,
),
]
),
onPressed: _onAddMessageButtonClick,
),
),
但是它给出了错误
A RenderFlex overflowed by 24 pixels on the right.
答案 0 :(得分:0)
删除IconButton
小部件
尝试一下
CircleAvatar(
radius: 40,
child: GestureDetector(
onTap: (){
// perform click here
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.add,
color: Colors.white,
),
Icon(
Icons.message,
color: Colors.white,
),
]
),
),
),
输出