I'm trying to create Paginated Data Table
to fill the height. However, whatever I'm trying nothing seems to work. How can I make the table fill the height? Also, how can I change the pagination background color?
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(state.department.name),
),
body: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TextButton(onPressed: () {}, child: Text('TEst 1')),
TextButton(onPressed: () {}, child: Text('TEst 1'))
],
),
Container(
child: PaginatedDataTable(
showCheckboxColumn: false,
headingRowHeight: 35,
columns: const <DataColumn>[
DataColumn(
label: Text(
'First Name',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
DataColumn(
label: Text(
'Last Name',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
DataColumn(
label: Text(
'Id',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
DataColumn(
label: Text(
'Time',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
DataColumn(
label: Text(
'Operator',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
],
source: tableSource
),
)
],
),
);
}
With Container
the container itself is filling up the height, but the paginated data table not.