In the code below, textAlign
property doesn\'t work. If you remove DefaultTextStyle
wrapper which is several levels above, textAlign
s
For maximum flexibility, I usually prefer working with SizedBox like this:
Row(
children: [
SizedBox(
width: 235,
child: Text('Hey, ')),
SizedBox(
width: 110,
child: Text('how are'),
SizedBox(
width: 10,
child: Text('you?'))
],
)
I've experienced problems with text alignment when using alignment in the past, whereas sizedbox always does the work.