Issue
I want to add a tapable icon right after a long text. I need to use Text
widget since I’m using textDirection
and maxLines
params.
Any ideas?
Solution
as Karen said it we need to use RichText.
Text.rich(
TextSpan(
text:
"I want to add a tapable icon right after a long text. I need to use Text widget since I'm using textDirection and maxLines params.",
children: [
WidgetSpan(
child: Icon(
Icons.error_outline,
color: Colors.red,
),
),
]),
),
Answered By – Yeasin Sheikh
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0