eastwater
eastwater

Reputation: 5630

Flutter PaginatedDataTable: how to show checkbox column?

How to show the checkbox column?

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

There is no checkbox column.

Upvotes: 2

Views: 492

Answers (1)

Zhentao
Zhentao

Reputation: 801

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) {}
      );

Upvotes: 1

Related Questions