Line.fromCells constructor

Line.fromCells(
  1. List<Cell> cells
)

Creates a line from pre-built cells without applying set() semantics.

This is primarily useful for porting upstream tests that include explicit wide-cell placeholder cells. Creates a line from cells without applying wide-cell semantics.

Implementation

factory Line.fromCells(List<Cell> cells) {
  // Lines own their cloned cells and must remain resizable/disposable.
  // A fixed-length list would make dispose() and any enclosing Buffer
  // resize fail when they clear the row.
  return Line._(cells.map((c) => c.clone()).toList());
}