toListOfList method

List<List<T>> toListOfList()

Returns a modifiable view of the matrix as a List<List<T>> object.

Implementation

List<List<T>> toListOfList() {
  return List<List<T>>.generate(
    rowCount,
    (row) {
      return List<T>.generate(columnCount, (col) => this(row, col));
    },
    growable: false,
  );
}