StyledString class final
StyledString is a string that can be decomposed into a series of styled lines and cells.
Upstream: third_party/ultraviolet/styled.go (StyledString).
- Implemented types
Constructors
- StyledString(String text, {bool wrap = false, String tail = ''})
-
Creates a styled string from
textwith optionalwrapandtail.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tail ↔ String
-
Trailing content appended after the main text when truncating.
getter/setter pair
- text → String
-
The raw text content, which may include ANSI escape sequences.
final
- wrap ↔ bool
-
Whether long lines should wrap to the next row.
getter/setter pair
Methods
-
bounds(
) → Rectangle -
Returns the bounds required to render text using grapheme widths.
override
-
draw(
Screen screen, Rectangle area) → void -
Draws this styled string into
screeninsidearea, clearing first.override -
height(
) → int - The number of lines in the original text.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the original text content.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited