i look to change the color of paginated datatable using flutter ,
i use dark themes and paginated datatable take that color , also i read from the flutter web site enter link description here
to use this CardTheme, but how to use it .. this my simple code for paginated datatable ..
class DataTableDemo extends StatelessWidget {
Widget build(BuildContext context) {
print("tesat");
MySource mySource = new MySource(
// ["test1##test2", "test3##test4", "test5##test6", "test7##test8"],
// ["test1##test2", "test3##test4", "test5##test6", "test7##test8"]
test2,
test3,
);
return Container(
// appBar: AppBar(
// title: Text('Data Tables'),
// ),
//backgroundColor: Color(0xff232d37),
color: Color(0xff232d37),
child: ListView(
padding: const EdgeInsets.all(2),
children: [
PaginatedDataTable(
//header: Text('Header Text'),
rowsPerPage: 10,
columns: [
DataColumn(label: Text('Header A')),
DataColumn(label: Text('Header B')),
DataColumn(label: Text('Header C')),
],
//source: _DataSource(context),
source: mySource,
),
],
),
);
}
}
class MySource extends DataTableSource {
List<String> value;
List<String> test1;
String a;
String b;
MySource(this.value, this.test1) {
print(value);
}
@override
DataRow getRow(int index) {
// TODO: implement getRow
// print('test');
//test1 = value[index].split("");
return DataRow.byIndex(
//color: MaterialStateColor.resolveWith((states) => Colors.blue),
index: index,
cells: [
DataCell(Text(value[index].toString())),
DataCell(Text(test1[index].toString())),
DataCell(
InkWell(
onTap: () {
print((value[index]));
},
child: Text("Click"),
),
),
],
);
}
@override
// TODO: implement isRowCountApproximate
bool get isRowCountApproximate => false;
@override
// TODO: implement rowCount
int get rowCount => value.length;
@override
// TODO: implement selectedRowCount
int get selectedRowCount => 0;
}
i need to set color as the color: Color(0xff232d37),
any help is apricated >>
regards