Cell class
A single character cell in the terminal buffer.
Each cell holds a symbol, foreground/background colors, and modifier.
Constructors
- Cell({String? symbol, Color fg = Color.reset, Color bg = Color.reset, RgbColor? fgRgb, RgbColor? bgRgb, IndexedColor? fgIndexed, IndexedColor? bgIndexed, Modifier? modifier, CellDiffOption diffOption = CellDiffOption.none})
- Cell.withChar(int char)
-
Create a cell with the specified
charcode point.factory
Properties
- bg ↔ Color
-
Background color.
getter/setter pair
- bgIndexed ↔ IndexedColor?
-
Indexed background color.
getter/setter pair
- bgRgb ↔ RgbColor?
-
RGB background color (24-bit).
getter/setter pair
- diffOption ↔ CellDiffOption
-
Controls diff behavior.
getter/setter pair
- fg ↔ Color
-
Foreground color.
getter/setter pair
- fgIndexed ↔ IndexedColor?
-
Indexed foreground color.
getter/setter pair
- fgRgb ↔ RgbColor?
-
RGB foreground color (24-bit).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- modifier ↔ Modifier
-
Text modifiers applied to this cell.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → Style
-
Get the current style as a Style object.
no setter
- symbol ↔ String
-
The character displayed in this cell.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Reset this cell to its default (empty) state.
-
setBg(
Color color) → void -
Set background to a named
color. -
setBgIndexed(
int index) → void - Set background to an indexed color.
-
setBgRgb(
int r, int g, int b) → void - Set background to an RGB color.
-
setChar(
int ch) → void - Set the symbol from a Unicode code point.
-
setFg(
Color color) → void -
Set foreground to a named
color. -
setFgIndexed(
int index) → void - Set foreground to an indexed color.
-
setFgRgb(
int r, int g, int b) → void - Set foreground to an RGB color.
-
setStyle(
Style style) → void -
Apply
styleto this cell. Merges with existing colors and modifiers. -
setSymbol(
String s) → void - Set the displayed symbol.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override