NatrixText class

Represents a multicharacter string with ansi escape sequence and filestream formatting.

Available extensions

Constructors

NatrixText(String text, {NatrixColor foreground = .none, NatrixColor background = .none, NatrixStyle style = .none})
const
NatrixText.empty()
const
NatrixText.join(List<NatrixText> parts)
factory

Properties

ansi → String
Format the ansi sequences into a ready-to-output string.
no setter
background → NatrixColor
The ansi escape sequence color of the background.
final
codeUnits → List<int>
Codeunits of the ansi-String.
no setter
foreground → NatrixColor
The ansi escape sequence color of foreground.
final
hashCode → int
The hash code for this object.
no setteroverride
isEmpty → bool
Whether the ansi-formatted-text is empty.
no setter
isNotEmpty → bool
Whether the ansi-formatted-text is not empty.
no setter
length → int
Length of the ansi-String.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → NatrixStyle
The ansi escape sequence style of the text.
final
text → String
The raw string which won't get manipulated later on.
final

Methods

asLineSection() → NatrixLine

Available on NatrixText, provided by the NatrixTextFormatExtension extension

format() → List<NatrixText>

Available on NatrixText, provided by the NatrixTextFormatExtension extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
valid() → bool
Whether the ansi string contains unallowed, cursor manipulating sequences.
wrap(int maxLength, [List<NatrixChar>? breakpointCharacter]) → List<NatrixText>
Wraps the ansi text literal into multiple lines to for-fill the requirements of maxLength. With breakpointCharacters, it could be specified where the line breaks should preferably be set.

Operators

operator *(int other) → NatrixText
operator +(NatrixText other) → NatrixText
operator ==(Object other) → bool
The equality operator.
override