Span

data class Span(val text: String, val style: TextStyle)

One contiguous run of text with a single style. Spans are the basic building block of RichTextNode — they let one paragraph mix bold, italic, coloured, or otherwise differently styled segments without breaking out of a single shared line-wrap pass.

Constructors

Link copied to clipboard
constructor(text: String, style: TextStyle)

Properties

Link copied to clipboard

the TextStyle applied to every glyph in text. Inherits from the surrounding paragraph defaults; the DSL handles the cascade.

Link copied to clipboard

the literal characters of this span. Whitespace is significant — leading / trailing spaces survive layout.