Line.filled constructor

Line.filled(
  1. int width
)

Creates a line of width cells, initialized to spaces.

Implementation

factory Line.filled(int width) {
  final cells = List<Cell>.generate(width, (_) => Cell.emptyCell());
  return Line._(cells);
}