operator []= method

void operator []=(
  1. int index,
  2. List value
)

Assigns the value to the specified row index of the matrix.

Implementation

void operator []=(int index, List<dynamic> value) {
  if (_data.isNotEmpty && value.length != columnCount) {
    throw Exception('Row has different length than the other rows');
  }
  if (index < 0 || index >= _data.length) {
    throw Exception('Index is out of range');
  }
  _data[index] = value;
}