Buffer.create constructor

Buffer.create(
  1. int width,
  2. int height
)

Implementation

factory Buffer.create(int width, int height) {
  final lines = List<Line>.generate(height, (_) => Line.filled(width));
  final b = Buffer._(lines);
  b.resize(width, height);
  return b;
}