The RichText
widget is used to display text in different styles. The text to display is described using a tree of **TextSpan** widgets, each of TextSpan
widget is associated with its own style.
RichText( text : TextSpan( text : "Hello, ", style : TextStyle(color.Colors.red), children : <TextSpan>[ TextSpan(text : "How are ", style : TextStyle(color: Colors.green)), TextSpan(text : "you?", style : TextStyle(color: Colors.blue)), ], ), ),
You can use maxLines
, overflow
, textAlign
arguments just like Text
widget.