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 { ...@@ -74,7 +74,11 @@ class TravelDestinationItem extends StatelessWidget {
new Positioned( new Positioned(
bottom: 16.0, bottom: 16.0,
left: 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,16 +87,21 @@ class TravelDestinationItem extends StatelessWidget { ...@@ -83,16 +87,21 @@ class TravelDestinationItem extends StatelessWidget {
new Flexible( new Flexible(
child: new Padding( child: new Padding(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0), padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
child: new DefaultTextStyle(
softWrap: false,
overflow: TextOverflow.ellipsis,
style: descriptionStyle,
child: new Column( child: new Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// three line description // three line description
new Text(destination.description[0], style: descriptionStyle), new Text(destination.description[0]),
new Text(destination.description[1], style: descriptionStyle), new Text(destination.description[1]),
new Text(destination.description[2], style: descriptionStyle), new Text(destination.description[2]),
] ]
) )
) )
)
), ),
// share, explore buttons // share, explore buttons
// TODO(abarth): The theme and the bar should be part of card. // TODO(abarth): The theme and the bar should be part of card.
......
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