currentCell property

RowColumnIndex get currentCell

A cell which is currently active.

This is used to identify the currently active cell to process the key navigation.

Implementation

RowColumnIndex get currentCell {
  final DataGridConfiguration dataGridConfiguration =
      _dataGridStateDetails!();
  final CurrentCellManager currentCell = dataGridConfiguration.currentCell;
  if (dataGridConfiguration.navigationMode == GridNavigationMode.row) {
    return grid_helper.resolveToRecordRowColumnIndex(
        dataGridConfiguration, RowColumnIndex(currentCell.rowIndex, -1));
  } else {
    return grid_helper.resolveToRecordRowColumnIndex(dataGridConfiguration,
        RowColumnIndex(currentCell.rowIndex, currentCell.columnIndex));
  }
}