Commit 69b4bcaf authored by Hans Muller's avatar Hans Muller Committed by GitHub

Use an ellipsis to clip wide cards_demo titles (#4604)

parent d11d388d
......@@ -74,7 +74,11 @@ class TravelDestinationItem extends StatelessWidget {
new Positioned(
bottom: 16.0,
left: 16.0,
child: new Text(destination.title, style: titleStyle)
child: new Text(destination.title,
style: titleStyle,
softWrap: false,
overflow: TextOverflow.ellipsis
)
)
]
)
......@@ -83,14 +87,19 @@ class TravelDestinationItem extends StatelessWidget {
new Flexible(
child: new Padding(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// three line description
new Text(destination.description[0], style: descriptionStyle),
new Text(destination.description[1], style: descriptionStyle),
new Text(destination.description[2], style: descriptionStyle),
]
child: new DefaultTextStyle(
softWrap: false,
overflow: TextOverflow.ellipsis,
style: descriptionStyle,
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// three line description
new Text(destination.description[0]),
new Text(destination.description[1]),
new Text(destination.description[2]),
]
)
)
)
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment