buildRow method

  1. @override
Widget buildRow(
  1. BuildContext context,
  2. T row,
  3. int index,
  4. RowRenderContext<T> renderContext,
)
override

Builds a single row widget.

context - Flutter BuildContext row - The data row to render index - Row index in the visible list renderContext - Additional rendering context (selection, controller, etc.)

Implementation

@override
Widget buildRow(
  BuildContext context,
  T row,
  int index,
  RowRenderContext<T> renderContext,
) {
  return VisibleRowTracker<T>(
    rowId: row.id,
    rowIndex: index,
    rowHeight: renderContext.rowHeight,
    controller: renderContext.controller,
    child: SizedBox(
      height: renderContext.rowHeight,
      child: Stack(
        children: [
          _UnpinnedCells<T>(
            row: row,
            index: index,
            renderContext: renderContext,
          ),
          if (renderContext.pinnedColumns.isNotEmpty)
            _PinnedCells<T>(
              row: row,
              index: index,
              renderContext: renderContext,
            ),
        ],
      ),
    ),
  );
}