Now I am using this code to show text in flutter, this is my code:
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(top: 8, bottom: 8.0),
child: Text(
item.subName,
softWrap: true,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
],
),
sometimes the text item.subName is too long, how to make it auto expand or render in new line when the text overflow? I have tried to add this but still not work:
softWrap: true,
This is the error:

Try this
new Container(
child: Row(
children: <Widget>[
Flexible(
child: new Text("sample text"))
],
));
Row(
children: <Widget>[
Expanded(
child: new Text("your text"))
],
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With