为什么我在CircleAvatar图标是不是在中心?
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
IconButton(
icon: CircleAvatar(
child: Icon(FontAwesomeIcons.tshirt, color: Colors.white,),
radius: 60.0,
backgroundColor: Colors.cyan
),
iconSize: 50.0,
onPressed: () {
//
},
),
Text('Odzież')
],
),
我用fontawesome添加图标,但添加图标之后,他是不是在thecentre圆头像,有任何人什么解决?
我觉得这是这个库很常见的问题。
你必须使用FaIcon部件,其附带的软件包。他们还提到在他们的这个问题单证常见问题。
解决方案:
只需更换与FaIcon你的图标部件。
CircleAvatar(
child: FaIcon(FontAwesomeIcons.tshirt, color: Colors.white,), // Icon widget changed with FaIcon
radius: 60.0,
backgroundColor: Colors.cyan
),
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句