-1
new Container(
          margin: const EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
          color: Colors.black12,
          child: new Row(

            children: <Widget>[
              new Image.asset('images/driver.jpeg',
                  height: 80.0,
                  width:150.0,
                alignment: Alignment.topLeft,
                repeat:ImageRepeat.repeat ,
                fit: BoxFit.fitHeight,
              ),
              new Image.asset('images/car.png',
                  height: 80.0,
                  width:150.0,
                alignment: Alignment.centerLeft,

              )
            ],
          ),
        ),
4

1 回答 1

0

应该适合什么?

如果您的意思是Container应该填充其父级,则可以将inifinity其设置为高度

new Container(
      height: double.infinity,
      ...

或拉伸您的交叉轴对齐Row

 Row(
     crossAxisAlignment: CrossAxisAlignment.stretch,
     ...
于 2018-06-24T10:23:26.870 回答