Buffer.fromCells constructor

Buffer.fromCells(
  1. Iterable<Cell> cells,
  2. {required int width}
)

Creates a new buffer from the given cells and width.

The cells must have a length that is a multiple of the width.

Implementation

factory Buffer.fromCells(Iterable<Cell> cells, {required int width}) {
  return Buffer._(Grid.fromCells(cells, width: width));
}