columns static method
List<PlexDataGridColumn<List<PlexDataTableValueCell> > >
columns(
- List<
PlexDataTableHeaderCell> headers
Implementation
static List<PlexDataGridColumn<List<PlexDataTableValueCell>>> columns(
List<PlexDataTableHeaderCell> headers,
) {
return headers
.map(
(PlexDataTableHeaderCell header) =>
PlexDataGridColumn<List<PlexDataTableValueCell>>(
id: header.columnName,
title: header.columnName,
numeric: header.isNumber,
sortable: header.showOrderByControl,
searchable: header.showFilterControl,
filterable: header.showFilterControl,
groupable: true,
value: (List<PlexDataTableValueCell> row) =>
valueFor(row, header.columnName),
cell: (BuildContext context, List<PlexDataTableValueCell> row) {
return _buildCell(row, header.columnName);
},
),
)
.toList();
}