A flutter project to explain the working of rich constructor of Text.
- Use the following code to use the constructor
constText.rich( TextSpan( text:'Hello', // default text style children:<TextSpan>[ TextSpan(text:' beautiful ', style:TextStyle(fontStyle:FontStyle.italic)), TextSpan(text:'world', style:TextStyle(fontWeight:FontWeight.bold)), ], ), ),