Buffer constructor

Buffer(
  1. int width,
  2. int height, {
  3. bool defaultBlend = true,
})

Creates a new buffer of width by height initialized with transparent empty cell data.

Implementation

Buffer(this.width, this.height, {this.defaultBlend = true})
  : _emptyModifiers = Modifier.transparent,
    characters = List.filled(width * height, ' '),
    attributes = Uint32List(width * height * 3) {
  for (var i = 2; i < attributes.length; i += 3) {
    attributes[i] = Modifier.transparent;
  }
}