颤振行和列问题

问题描述 投票:0回答:1

我面临着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,)
                ]
              ),
              )
          ],
        ),
      ),
    );

Actual Widget

Actual SVG

您可以在此处下载资产/image.svghttp://filesharing24.com/d/DVh

flutter flutter-layout flutter-animation
1个回答
0
投票

mainAxisSize: MainAxisSize.max添加到Column小部件。

© www.soinside.com 2019 - 2024. All rights reserved.