Flutter PaginatedDataTable: how to show checkbox column?

197 Views Asked by At

How to show the checkbox column?

 PaginatedDataTable(
    showCheckboxColumn: true,
    columns: _columns,
    source: _dataTableSource,
  ),

There is no checkbox column.

1

There are 1 best solutions below

0
On BEST ANSWER

According to the document

showCheckboxColumn → bool Whether the widget should display checkboxes for selectable rows.

so your DataRow must be selectable if you want to show the checkbox column, add onSelectChanged to the DataRow

     DataRow(
       cells: <DataCell>[ ],
       onSelectChanged: (selected) {}
      );