Flutter 如何创建如下表
这个表创建得非常好,但我希望表的结构像这样 但我正在看 这是我想到的源代码: 任何帮助都将不胜感激。谢谢Flutter 如何创建如下表,flutter,Flutter,这个表创建得非常好,但我希望表的结构像这样 但我正在看 这是我想到的源代码: 任何帮助都将不胜感激。谢谢 DataTable( columns: <DataColumn>[ DataColumn( numeric: true, label: Container( child: Text( "ID", style: TextStyle(fontSize: 16, color: Colors.white)
DataTable(
columns: <DataColumn>[
DataColumn(
numeric: true,
label: Container(
child: Text(
"ID", style: TextStyle(fontSize: 16, color: Colors.white)),
alignment: Alignment.center,
width: 50,
height: 30,
decoration: BoxDecoration(
border: Border.all(), color: Colors.lightBlue)),
tooltip: "ID OF THE NAME")
],
rows:[
DataRow(cells: <DataCell>[
DataCell(
Row(children: <Widget>[
Expanded(child: Dismissible(
child: ListTile(
title: Text(data)),
key: ObjectKey(value++),
onDismissed: (direction){
setState(() {
_add.remove(data);
});
},
))
]),
)
])
]
);
DataTable(
栏目:[
数据列(
数字:对,
标签:集装箱(
子:文本(
“ID”,样式:TextStyle(fontSize:16,颜色:Colors.white)),
对齐:对齐.center,
宽度:50,
身高:30,
装饰:盒子装饰(
边框:border.all(),颜色:Colors.lightBlue)),
工具提示:“名称的ID”)
],
行:[
数据行(单元格:[
数据单元(
世界其他地区(儿童:[
扩展(子:可忽略)(
孩子:ListTile(
标题:文本(数据)),
key:ObjectKey(value++),
onDismissed:(方向){
设置状态(){
_添加、删除(数据);
});
},
))
]),
)
])
]
);