这是我的代码。
Card(
child: Row(
children: [
Container(
color: Colors.red,
child: Icon(Icons.home)
,),
Column(
children: [
Text('aliazad'),
Text('aliazad'),
Text('aliazad'),
Text('aliazad'),
],
),
],
),
);
您必须用Row
包裹Container
并给它一个height
,如下所示:
Card(
child: Container(
height: 80,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
color: Colors.red,
child: Icon(Icons.home),
),
Column(
children: [
Text('aliazad'),
Text('aliazad'),
Text('aliazad'),
Text('aliazad'),
],
),
],
),
),
),