我想将图片中电子邮件卡片下方的按钮更改为社交媒体链接。但是,我在查找这些链接的图标时遇到问题。我希望能够操作图标并更改颜色。
Here's My App
我想出的一个解决方案是使用内部的图像资源而不是图标,但这样做我无法更改颜色。
下面是我的代码:
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
color: Colors.white,
child: IconButton(
onPressed: null,
icon: Icon(
Icons.ac_unit,
color: Colors.black,
),
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
color: Colors.white,
child: IconButton(
onPressed: null,
icon: Icon(
Icons.ac_unit,
color: Colors.black,
),
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
color: Colors.white,
child: IconButton(
onPressed: null,
icon: Icon(
Icons.ac_unit,
color: Colors.black,
),
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
color: Colors.white,
child: IconButton(
onPressed: null,
icon: Icon(
Icons.ac_unit,
color: Colors.black,
),
),
),
),
],
),
2条答案
按热度按时间56lgkhnf1#
您可以使用此软件包:https://pub.dev/packages/font_awesome_flutter
有了这个,你可以轻松地为图标设置样式:
Icon(FontAwesomeIcons.facebook, color: widget.color, size: 16.0)
图标名称可在此处找到:https://fontawesome.com/v5.15/icons?d=gallery&p=2
svmlkihl2#
使用字体包_awesome_flutter
https://pub.dev/packages/font_awesome_flutter