【发布时间】:2021-07-02 12:17:30
【问题描述】:
我想将图片中电子邮件卡片下方的按钮更改为社交媒体链接。但是,我很难找到这些图标。我希望能够操作图标并更改颜色。
我想出的一个解决方案是在内部使用图像资源而不是图标,但这样做我无法更改颜色。
这是我的代码:
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,
),
),
),
),
],
),
【问题讨论】: