我正在尝试在Container中包装文本。我希望文本在到达Container的右下角时添加省略号。但是,使用TextOverflow.ellipsis
会在第一行放置省略号,但不会在Container中换行。我怎样才能达到这个效果?
Widget _cardIfImage(BuildContext context) {
return new Card(
color: Theme.of(context).cardColor,
child: new Container(
height: cardMaxHeight,
padding: new EdgeInsets.all(10.0),
child: new Row(
children: <Widget>[
new Expanded(
flex: 1,
child: new Image.network(urlToImage),
),
new Expanded(
flex: 2,
child: new Container(
padding: new EdgeInsets.only(
left: 10.0,
),
child: new Column(
children: <Widget>[
new Expanded(
flex: 2,
child: new Container(
child: new Text(
title,
// overflow: TextOverflow.ellipsis,
)),
),
new Expanded(
flex: 1,
child: new Container(
alignment: Alignment.bottomLeft,
child: new Text(source),
),
),
],
),
)),
],
),
),
);
}