flutter - 如何在 Flutter 中隐藏 DataTable 的列标题?
问题描述
如何在 Flutter 中隐藏 DataTable 的列标题?
Flutter 中的数据表
DataTable(
headingRowHeight: 0,
columns: <DataColumn>[
DataColumn(label: Text("Name")),
DataColumn(label: Text("Hour")),
DataColumn(label: Text("Tag")),
DataColumn(label: Text("Date")),
DataColumn(label: Text("Action")),
], rows: lstCourse.map((e) => DataRow(
cells: <DataCell>[
DataCell(Text(e.Name)),
DataCell(Text(e.Hour_Text)),
DataCell(Text(e.Tag)),
DataCell(Text(e.StartDate_Text)),
DataCell(RaisedButton(onPressed: (){}, child: Text("Đăng ký"),)),
]
)).toList()
);
我试图在 DataTable 类中找到一些选项,但似乎不存在
解决方案
headingRowHeight 为 0,空容器为 DataColumn 标签
DataTable(
headingRowHeight: 0,
columns: [
DataColumn(label: Container()),
DataColumn(label: Container()),
DataColumn(label: Container()),
DataColumn(label: Container()),
DataColumn(label: Container()),
],
rows: ..
),
推荐阅读
- zeromq - 用于发布/订阅的 ZMQ C++ 主题
- verification - OIDC 签名验证
- java - 如何使用带有 jks 证书的 saaj 创建肥皂请求?
- ascii - 在 Julia 中,如何将 ASCII 十进制列表转换为字符串?
- c# - 如何知道 DataGridView.CellValueChanged 事件中的旧值?
- regex - 如何匹配\"而不是"
- amazon-web-services - 是否可以阻止 AWS API Gateway 创建的代理中的某些 API?
- javascript - 我怎样才能简化这个返回语句?
- node.js - Post 请求发送未定义数据 inn flutter app
- callback - Flutter - 从一个子类调用方法到另一个子类