我试图将图标居中在圆形背景中,但即使我使用中心小部件作为子小部件,它也会失败,除非增加容器大小。
Container(
height: 22,
width: 22,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xffF7825C),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
)