【发布时间】:2020-06-01 02:32:50
【问题描述】:
我在我的应用程序中使用FontAwesomeIcon Plugin。
FontAwesomeIcon 插件中的一些图标与 Text 小部件重叠,如下图所示。
我可以通过在 Text 和 Icon 之间添加一些宽度来解决这个问题,但这并不好。那么如何解决这个问题。
我需要这样的图片。
这里我没有在图标和文本之间添加任何宽度。
代码:
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
children: <Widget>[
Icon(
Icons.trip_origin,
color: Colors.white,
),
Text(
'TP-23',
style: TextStyle(color: Colors.white),
)
],
),
Row(
children: <Widget>[
Icon(
FontAwesomeIcons.idCard,
color: Colors.white,
),
Text(
'TP-23',
style: TextStyle(color: Colors.white),
)
],
)
],
),
【问题讨论】:
-
兄弟可以加个代码吗?
-
@AR代码加了兄弟。
标签: flutter dart icons font-awesome font-awesome-5