dart - Flutter - 对齐表格中的文本
问题描述
如何对齐我的文本Table
?
左起第一列 ( ID
),右起第二列 ( Value
)。
child: Table(
children: [
TableRow(children: [
TableCell(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
children: <Widget>[
new Text('ID'),
new Text('Value'),
],
),
)
]),
解决方案
您可以使用mainAxisAlignment:MainAxisAlignment.spaceBetween
而不是MainAxisAlignment.spaceAround
推荐阅读
- javascript - 猫鼬模式错误:未定义的“类型”
- conditional-statements - 如何在 PDDL 中设置条件?
- powershell - Invoke-WebRequest 使用 SSO 从 Salesforce 下载 csv 文件
- salesforce - 翻译 Salesforce 案例摘要
- reactjs - React JS材料表 - 如何在材料表中选择当前页面的行
- python-3.x - 打印 Python 类的每个对象
- checkbox - ExtJS Sencha 复选框焦点颜色更改/禁用
- python - 努力研究如何使用 Discord.py 将嵌入式消息发送到某个频道
- node.js - TypeError: fs__WEBPACK_IMPORTED_MODULE_2__.readdirSync 不是函数(如何在打字稿中读取目录中的文件名?)
- r - 如何在选项卡面板中同时显示表格和图形?