
Here the code:
class TextFieldTest extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 50),
child: TextField(
maxLines: 10,
keyboardType: TextInputType.multiline,
textAlign: TextAlign.center,
style: TextStyle(
wordSpacing: 5,
height: 2,
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 26,
background: Paint()
..color = Colors.blue
..style = PaintingStyle.stroke
..strokeWidth = 35
..strokeJoin = StrokeJoin.round,
),
),
),
),
);
}
}
The strokeWidth should be larger than the fontSize to fill all the text by the color you choose.
Try to play with it so that you end up with more accurate result.