columnIndex method

int columnIndex(
  1. String colName
)

Implementation

int columnIndex(String colName) {
  final i = columns
      .indexWhere((c) => c.name.toLowerCase() == colName.toLowerCase());
  if (i == -1) {
    throw StateError('Column "$colName" not found in table "$name"');
  }
  return i;
}