How to get the value of String in RichText
Widget.
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black, fontSize: 36),
children: <TextSpan>[
TextSpan(text: 'Woolha ', style: TextStyle(color: Colors.blue)),
TextSpan(text: 'dot '),
TextSpan(
text: 'com',
style: TextStyle(decoration: TextDecoration.underline))
],
),
textScaleFactor: 0.5,
)
I want to get the value of String in RichText
, does anyone have a way to do it?
You can use key to extract text from
RichText
.