flutter - 如何使用边距为 30 的容器中的行制作 3*3 容器,如矩阵,我是颤振的初学者
问题描述
appBar: AppBar(title: Text("row"), ), body: Row(children: [Column(children: [Container( padding: EdgeInsets.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'),],
),
],
),
)
,
);
} }
解决方案
设置crossAxisCount: 3
,有关更多信息,请参阅此
推荐阅读
- angular - 以角度 10 映射和对象到 objectDto
- python - 如何使用另一个python文件中使用的unittest来模拟变量的值
- dask - Dask - GIL控股
- java - 如何在 Java 中的单个数据库操作中插入文档并在 MongoDB 中返回相同的文档?
- mongodb - 用于将对象数组中的嵌套语言对象提取到单个文档中的聚合管道
- .htaccess - 无法将 http 请求重定向到 https
- docker - 如何使用 Ingress 公开服务?
- swift - Firebase 日志事件和参数
- php - Laravel nginx 路由在 localhost ubuntu 18.04 中不起作用
- python - 如何在 pandas df 中提取和删除?