Reputation: 733
Which parameter should I change to fit the values fom "childen : [...]" to the top in UI? (Currently they are filling all free spase in the Container). Thank you in advance for explanation!! Code snippet:
return new Container(
child: new Column (
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text('\$$priceUsd\n'),
new Text('1 hour: $percentChange1h%',
style: new TextStyle(
color: changeColor),
)],
)
);
Upvotes: 7
Views: 10288
Reputation: 31356
just set the main axis alignment to the start
return new Container(
child: new Column (
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text('\$$priceUsd\n'),
new Text('1 hour: $percentChange1h%',
style: new TextStyle(color: changeColor),
)],
)
);
Upvotes: 11