I'm working on positioning these columns on my datatable but I can't figure it out. Here is what it currently looks like with the working code:
Container(
color: Color(0xffF5F5F5),
child: DataTable(
headingRowHeight: 40,
columns: [
DataColumn(label: IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
icon: Icon(Icons.remove_circle, color: Color(0xffB93E3E),),
onPressed: () {
// setState(() {
// // _volume += 10;
// });
},
)),
DataColumn(label: Text('Text')),
DataColumn(label: IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
icon: Icon(Icons.menu, color: Color(0xff979797),),
tooltip: 'Hold and move up and down to sort.',
onPressed: () {
// setState(() {
// // _volume += 10;
// });
},
)),
],
rows: [
],
),
),
Container(
color: Color(0xffF5F5F5),
child: DataTable(
headingRowHeight: 40,
columns: [
DataColumn(
label: IconButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
icon: Icon(Icons.add_circle, color: Color(0xff58B93E),),
onPressed: () {
// setState(() {
// // _volume += 10;
// });
},
)),
DataColumn(label: Text('Text')),
],
rows: [
],
),
),
Here is the position that I'd like the columns to be at. As you can see the IconButton is positioned on the left then the text is straight after that and the Menu icon is positioned at the end on the minus button row:
Using simple column and rows.
Using DataTable. I do not know your need, but to use datatable it is necessary to make a workaround and place the items in the header. This is not highly recommended