我面临着Rows抖动的问题,我想将资产放在容器的底部,如何使用Row来做到这一点?我尝试了mainAxisAlignment:MainAxisAlignment.end和cross.end,但是无法正常工作...
Widget build(BuildContext context) {
double wi = MediaQuery.of(context).size.width;
return Scaffold(
body: Container(
child: Column(
children: <Widget>[
Container(
color: Colors.blue,
width: wi,
height: 200,
),
Container(
width: wi,
height: 200,
color: Colors.red,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
SvgPicture.asset('assets/escapa.svg', semanticsLabel: 'Flask', color: Colors.black, width: 100,height: 100,)
]
),
)
],
),
),
);
您可以在此处下载资产/image.svghttp://filesharing24.com/d/DVh
将mainAxisSize: MainAxisSize.max
添加到Column
小部件。