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,14 +87,19 @@ class TravelDestinationItem extends StatelessWidget { ...@@ -83,14 +87,19 @@ 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 Column( child: new DefaultTextStyle(
crossAxisAlignment: CrossAxisAlignment.start, softWrap: false,
children: <Widget>[ overflow: TextOverflow.ellipsis,
// three line description style: descriptionStyle,
new Text(destination.description[0], style: descriptionStyle), child: new Column(
new Text(destination.description[1], style: descriptionStyle), crossAxisAlignment: CrossAxisAlignment.start,
new Text(destination.description[2], style: descriptionStyle), 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