TextRun class final
A span of text that shares one presentation.
Font family, size and color are optional; when null, the run inherits them from its region.
Constructors
- TextRun(String text, {TextRunAttributes? attributes, String? fontFamily, double? fontSize, DiagramColor? color})
Properties
- attributes → TextRunAttributes?
-
Inline presentation owned by a text definition, such as rich text
marks, or null for a plain run.
final
- color → DiagramColor?
-
Optional inline color; null inherits the text region foreground.
final
- fontFamily → String?
-
final
- fontSize → double?
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasValidAppearance → bool
-
Null appearance inherits from the region; authored size must be positive.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
final
Methods
-
appearance(
TextRole role) → TextRunAppearance - Portable appearance shared by shaping, painting and output adapters. Admission and editing permissions remain owned by the text definition.
-
copyWith(
{String? text, Object? attributes = _unsetTextRunValue, Object? fontFamily = _unsetTextRunValue, Object? fontSize = _unsetTextRunValue, Object? color = _unsetTextRunValue}) → TextRun -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sameStyle(
TextRun other) → bool -
Whether
otherhas the same presentation, whatever its text. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override