Example 1: rich text flutter
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, )
Example 2: rich text flutter
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)) ], ), )
Example 3: rich text flutter
List<TextSpan> textSpans = <TextSpan>[ TextSpan(text: 'Woolha ', style: TextStyle(color: Colors.blue)), TextSpan(text: 'dot '), TextSpan(text: 'com '), TextSpan(text: 'word '), TextSpan(text: 'word '), TextSpan(text: 'word'), TextSpan(text: 'word'), TextSpan(text: 'word'), TextSpan(text: 'word'), TextSpan(text: 'word'), ];
Example 4: rich text flutter
RichText( text: TextSpan( style: TextStyle(color: Colors.black, fontSize: 18), children: textSpans, ), )
Example 5: richtextbox fluter
RichText(
text: TextSpan(
text: 'Hello ',
style: DefaultTextStyle.of(context).style,
children: <TextSpan>[
TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: ' world!'),
],
),
)