Cell class final

A single cell in a terminal Buffer.

A cell contains one grapheme, a UvStyle, an optional Link, and its display width. This Dart port keeps the public mutable API but also caches a packed metadata signature so equality and hashing stay fast for the common case of plain single-rune cells.

Upstream: third_party/ultraviolet/cell.go (Cell, EmptyCell).

Constructors

Cell({String content = '', UvStyle style = const UvStyle(), Link link = const Link(), Object? drawable, int? width})

Properties

content String
The grapheme content stored in this cell.
getter/setter pair
drawable Object?
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Whether this cell represents a plain space with no attributes.
no setter
isZero bool
Whether this cell has no content, style, link, or drawable.
no setter
The canonicalized hyperlink metadata for this cell.
getter/setter pair
linkId int?
The pooled link id for this cell, if any.
no setter
packed PackedCell
Returns a fixed-layout packed cell tuple for fast comparisons.
no setter
pooledContentId int?
The pooled complex grapheme id for this cell, if any.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style UvStyle
The canonicalized style for this cell.
getter/setter pair
width int
The display width of this cell in terminal columns.
getter/setter pair

Methods

clone() Cell
Returns a copy of this cell.
dispose() → void
Releases any pooled grapheme content owned by this cell.
empty() → void
Sets this cell to a space with width 1.
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
The equality operator.
override

Static Methods

emptyCell() Cell
Creates a space cell with width 1.
newCell(WidthMethod method, String grapheme) Cell
Creates a new cell from a grapheme, computing its display width.