Can flutter PaginatedDataTable rowsPerPage be set to a number not divisible by 10?
UPDATE
Data used b
rowsPerPage
and availableRowsPerPage
need to be defined together.
For example:
_rowsPerPage = 5;
recalculate _rowsPerPage
in build method:
@override
Widget build(BuildContext context) {
_rowsPerPage = widget.items.length > 5 ? 5 : widget.items.length;
return _buildCollectivePanel();
}
then add rowsPerPage
, availableRowsPerPage
to the PaginatedDataTable
in _buildCollectivePanel()
PaginatedDataTable(
header: Text("dataTableHeader"),
rowsPerPage: _rowsPerPage,
availableRowsPerPage: [_rowsPerPage, _rowsPerPage * 2, _rowsPerPage * 5, _rowsPerPage * 10],......