buildDataCells method

List<DataCell> buildDataCells(
  1. T item,
  2. bool isSelected
)

Implementation

List<DataCell> buildDataCells(T item, bool isSelected) {
  final cells = <DataCell>[];

  cells.addAll(
    item.rows.map((row) => DataCell(
          XfdnText(
            row.toString(),
            textColor: isSelected
                ? XfdnDesignSystem.settings.primaryColor
                : Colors.black,
          ),
          onTap: widget.onTap == null ? null : () => widget.onTap?.call(item),
        )),
  );

  if (widget.actions.isNotEmpty) {
    cells.add(buildActionsCell(item));
  }

  return cells;
}