LayeredText class

A text node's paragraph, painted once per layer.

With no layers this is exactly the Text.rich it always was — the stack is opt-in, and the ordinary case pays nothing for it. The state exists only to keep the shaders a shader pass draws with across frames; without a stack it holds nothing.

Inheritance

Constructors

LayeredText({Key? key, required InlineSpan span, required TextStyle style, required List<TextLayer> layers, required TextAlign textAlign, required int? maxLines, ValueListenable<Duration>? time})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layers → List<TextLayer>
final
maxLines → int?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
span → InlineSpan
final
style → TextStyle
The metric style — what every pass shares, and what the cache is keyed on. Its colour is the fallback a layer with no paint of its own takes.
final
textAlign → TextAlign
final
time → ValueListenable<Duration>?
Scene time for a shader pass's uTime. Listened to only when the stack holds a shader pass; null is zero.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<LayeredText>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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