writeChunk method

int writeChunk(
  1. String text,
  2. Color fg,
  3. Color bg,
  4. int attributes,
)

Writes text to the buffer at the current write position, returning the number of cells written.

Implementation

int writeChunk(String text, Color fg, Color bg, int attributes) {
  _checkNotDisposed();
  _utf8Scratch.update(text);
  final written = _bindings.textBufferWriteUtf8Chunk(
    _ptr,
    _utf8Scratch.pointer,
    _utf8Scratch.length,
    fg,
    bg,
    attributes,
  );
  return written;
}