columnIndex method

  1. @override
int? columnIndex(
  1. PlutoColumn column
)
inherited

Index of column in columns

Depending on the state of the frozen column, the column order index must be referenced with the columnIndexesByShowFrozen function.

Implementation

@override
int? columnIndex(PlutoColumn column) {
  final columnIndexes = columnIndexesByShowFrozen;
  final length = columnIndexes.length;

  for (int i = 0; i < length; i += 1) {
    if (refColumns[columnIndexes[i]].field == column.field) {
      return i;
    }
  }

  return null;
}