deleteColumn method

void deleteColumn(
  1. int index
)

Removes the column with given index.

The index must be in the range 0..columns-1.

Implementation

void deleteColumn(int index) {
  if (index >= columns || index < 0) {
    throw ArgumentError('index must be a valid column index');
  }

  for (var row in _table) {
    row.removeAt(index);
  }

  _columnAlignments.removeAt(index);
  _columnWidths.removeAt(index);

  assert(_tableIntegrity);
}