首页 > 解决方案 > 如何使用边距为 30 的容器中的行制作 3*3 容器,如矩阵,我是颤振的初学者

问题描述

appBar: AppBar(title: Text("row"), ), body: Row(children: [Column(children: [Container( padding: E​​dgeInsets.all(30), margin: EdgeInsets.all(30), width: 50) ,

    height: 50,
    decoration: BoxDecoration(
        color: Colors.blue),

    child: Center(child: Text('2')),),
  Text('5'),
  Text('6'),
  ],
),

Column(
children: [Container(
padding: EdgeInsets.all(30),
margin: EdgeInsets.all(30),
width:50,

height:50,
decoration: BoxDecoration(
color:Colors.blue


child: Text('3')),Text('5'),
Text('6'),
),
],
),
Column(
children: [Container(child: Text('4')),Text('5'),
Text('6'),],
),
],
),
)
,
);

} }

标签: fluttercontainersrows

解决方案


设置crossAxisCount: 3,有关更多信息,请参阅


推荐阅读