I would like to change the background color of my WebDataTable but couldnt figure out a way how to do it.
Additionally I chose a WebDataTable cause i wanted to add a button inside of the table and this was the only possiblity to do it:
How to add buttons into datatables in flutter?
Is there maybe a better option?
My Code:
[....]
body: Center(
child: Column(
children: [
SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(25),
child: WebDataTable(
header: Text(
"Test-Table"
),
),
source: WebDataTableSource(
columns: [
WebDataColumn(
name: 'row_One',
label: const Text('row_One'),
dataCell: (value) {
return DataCell(value);
},
),
WebDataColumn(
name: 'btn',
label: const Text('MyButton'),
dataCell: (value) {
return DataCell(value);
},
),
],
rows: SampleData().data,
)),
),
),
],
),
),
bottomNavigationBar: MyBottomNavigationBar());
}
}