Want to add border around TextSpan in RichText widget? Use the below example code to add border around TextSpan in RichText widget in your flutter application.
Paint paint = Paint()
..color = Colors.blue
..style = PaintingStyle.stroke
..strokeCap = StrokeCap.round
..strokeWidth = 2.0;
text: TextSpan(children: [
TextSpan(text: '456', style: TextStyle(background: paint)),
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.