BufferCell class Core

A single character cell in the terminal UI buffer.

Each BufferCell represents one printable cell on the terminal grid, holding a character, foreground/background color, and font styling. This is the fundamental unit used by the rendering engine to track visual content.

The cell is mutable and can be cleared or compared to others for optimized redraws or diffing purposes.

Constructors

BufferCell.new({required String char, AnsiColorType? fg, AnsiColorType? bg, Set<FontStyle>? styles})
Creates a BufferCell with the given char, optional fg, bg, and a set of styles.

Properties

bg AnsiColorType?
The optional background color of the cell.
getter/setter pair
char String
The character rendered in the cell.
getter/setter pair
fg AnsiColorType?
The optional foreground color of the cell.
getter/setter pair
hashCode int
Returns a hash code based on the character, colors, and styles.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
styles Set<FontStyle>
A set of font styles (e.g., bold, italic) applied to this cell.
getter/setter pair

Methods

clear() → void
Clears the contents of this cell.
copy() BufferCell
Creates a copy of this cell with the same character and colors.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Compares this cell to other for value equality.
override