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),
)],
)
);
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),
)],
)
);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.