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,
)
],
),
),
答案 0 :(得分:1)
什么是合适的?
如果您的意思是Container
应该填充其父级,则可以将inifinity
设置为其高度
new Container(
height: double.infinity,
...
或拉伸Row
的横轴对齐方式
Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
...