Cell class
A two-dimensional cell, sometimes called a "pixel", within a screen.
A cell is a simple immutable value-type that is a combination of a:
- character, which defaults to a space (
' '
). - foregroundColor
- backgroundColor
- Annotations
-
- @immutable
- @sealed
Constructors
- Cell([String? character])
-
Creates a cell that will render the provided
character
string.factory - Cell.ofCharacter(int character)
-
Creates a cell that will render the provided
character
code.
Properties
- backgroundColor → Color?
-
If provided, the 24-bit RGB color used for styling the background.
final
- character → int
-
Character code to be rendered in this cell.
final
- foregroundColor → Color?
-
If provided, the 24-bit RGB color used for styling the character.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearCharacter(
) → Cell - Returns the cell with the character cleared (reset to a space).
-
clearColors(
) → Cell - Returns the cell with all colors cleared (reset to the default).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
withCharacter(
int character) → Cell -
Returns the cell with a new
character
set. -
withColor(
{Color? foreground, Color? background}) → Cell - Returns the cell with colors set.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override