TextRun class

One stretch of a paragraph, and what it differs by.

A text is a LIST of these, and the list is the paragraph: it is laid out and wrapped as one, which is the whole reason a bold word cannot be a second node beside the first. style is a DELTA over the node's own — only what this run changes — and the same SceneTextStyle type says it, because "unset means take what is underneath" is already what a style's nulls mean.

A run carries no SceneTextStyle.layers: the paint stack paints a whole laid-out paragraph once per pass, and a stack that applied to a stretch of one would have to lay that stretch out alone — which is the law a stack exists under (a pass may change paint, never layout). The grammar refuses it rather than dropping it.

Anonymous, like a paint pass and for the same reason: a run named as a field of one scene is a run no other scene can have, and a style that carries its runs can be shared whole.

Constructors

TextRun(String text, {SceneTextStyle? style})
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → SceneTextStyle?
What this run changes about the node's style — null where it changes nothing, which is the ordinary run.
final
text → String
final

Methods

copyWith({String? text, SceneTextStyle? style}) → TextRun
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override