cellPositionByCellKey method

  1. @override
PlutoGridCellPosition? cellPositionByCellKey(
  1. Key? cellKey
)
inherited

Index position of cell in a column

Implementation

@override
PlutoGridCellPosition? cellPositionByCellKey(Key? cellKey) {
  if (cellKey == null) {
    return null;
  }

  final length = refRows.length;

  for (int rowIdx = 0; rowIdx < length; rowIdx += 1) {
    final columnIdx = columnIdxByCellKeyAndRowIdx(cellKey, rowIdx);

    if (columnIdx != null) {
      return PlutoGridCellPosition(columnIdx: columnIdx, rowIdx: rowIdx);
    }
  }

  return null;
}