图中效果使用图文混排实现,要用到WidgetSpan,可以接入任何Widget
Container(
padding: EdgeInsets.only(top: 12, left: 0, right: 0, bottom: 0),
child: Text.rich(TextSpan(
children: [
WidgetSpan(
alignment: PlaceholderAlignment.top,
child: ClipOval(
child: Container(
width: 6,
height: 6,
color: Color.fromRGBO(237,88,88,1),
),
),
),
TextSpan(
text:' 暗夜里人们因疲累而沉睡时我们坚守岗位用执行力稳固网格管理我们是网格员 。',
style: TextStyle(
color: Color.fromRGBO(0, 0, 0, 0.8)