TaggedTextSpan class
TaggedTextSpan extends TextSpan to include a tag object and the ability to be split at a provided index. Other than that it is functionally equivalent to TextSpan.
- Inheritance
-
- Object
- DiagnosticableTree
- InlineSpan
- TextSpan
- TaggedTextSpan
- Available Extensions
- Annotations
Constructors
-
TaggedTextSpan({required Object tag, String? text, List<
InlineSpan> ? children, TextStyle? style, GestureRecognizer? recognizer, MouseCursor? mouseCursor, PointerEnterEventListener? onEnter, PointerExitEventListener? onExit, String? semanticsLabel, Locale? locale, bool? spellOut}) -
Creates a TaggedTextSpan with the provided properties.
const
Properties
-
children
→ List<
InlineSpan> ? -
Additional spans to include as children.
finalinherited
- cursor → MouseCursor
-
Returns the value of mouseCursor.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- locale → Locale?
-
The language of the text in this span and its span children.
finalinherited
- mouseCursor → MouseCursor
-
Mouse cursor when the mouse hovers over this span.
finalinherited
- onEnter → PointerEnterEventListener?
-
Triggered when a mouse pointer, with or without buttons pressed, has
entered the region and validForMouseTracker is true.
finalinherited
- onExit → PointerExitEventListener?
-
Triggered when a mouse pointer, with or without buttons pressed, has
exited the region and validForMouseTracker is true.
finalinherited
- recognizer → GestureRecognizer?
-
A gesture recognizer that will receive events that hit this span.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String?
-
An alternative semantics label for this TextSpan.
finalinherited
- spellOut → bool?
-
Whether the assistive technologies should spell out this text character
by character.
finalinherited
- style → TextStyle?
-
The TextStyle to apply to this span.
finalinherited
- tag → Object
-
The tag object.
final
- text → String?
-
The text contained in this span.
finalinherited
- validForMouseTracker → bool
-
Whether this is included when MouseTracker collects the list of
annotations.
no setterinherited
Methods
-
build(
ParagraphBuilder builder, {TextScaler textScaler = TextScaler.noScaling, List< PlaceholderDimensions> ? dimensions}) → void -
Apply the style, text, and children of this object to the
given ParagraphBuilder, from which a Paragraph can be obtained.
Paragraph objects can be drawn on Canvas objects.
inherited
-
codeUnitAt(
int index) → int? -
Returns the UTF-16 code unit at the given
index
in the flattened string.inherited -
codeUnitAtVisitor(
int index, Accumulator offset) → int? -
Performs the check at each InlineSpan for if the
index
falls within the range of the span and returns the corresponding code unit. Returns null otherwise.inherited -
compareTo(
InlineSpan other) → RenderComparison -
Describe the difference between this span and another, in terms of
how much damage it will make to the rendering. The comparison is deep.
inherited
-
computeSemanticsInformation(
List< InlineSpanSemanticsInformation> collector, {Locale? inheritedLocale, bool inheritedSpellOut = false}) → void -
Walks the InlineSpan tree and accumulates a list of
InlineSpanSemanticsInformation objects.
inherited
-
computeToPlainText(
StringBuffer buffer, {bool includeSemanticsLabels = true, bool includePlaceholders = true}) → void -
Walks the InlineSpan tree and writes the plain text representation to
buffer
.inherited -
debugAssertIsValid(
) → bool -
In debug mode, throws an exception if the object is not in a valid
configuration. Otherwise, returns true.
inherited
-
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
-
getSemanticsInformation(
) → List< InlineSpanSemanticsInformation> -
Flattens the InlineSpan tree to a list of
InlineSpanSemanticsInformation
objects.inherited -
getSpanForPosition(
TextPosition position) → InlineSpan? -
Returns the InlineSpan that contains the given position in the text.
inherited
-
getSpanForPositionVisitor(
TextPosition position, Accumulator offset) → InlineSpan? -
Returns the text span that contains the given position in the text.
inherited
-
handleEvent(
PointerEvent event, HitTestEntry< HitTestTarget> entry) → void -
Override this method to receive events.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
splitAt(
int index, {bool ignoreFloatedWidgetSpans = false}) → List< InlineSpan> -
Splits this object at the given
index
and returns a list of one or two objects. Ifindex
is zero, or ifindex
is greater than the number of items in this object, a list containing just this object is returned. If this object was split, a list of two objects is returned, containing the two new split objects.inherited -
splitAtIndex(
SplitAtIndex index, {bool ignoreFloatedWidgetSpans = false}) → List< InlineSpan> -
Splits this object at the given
index
and returns a list of one or two objects. Ifindex
is zero, or ifindex
is greater than the number of items in this object, a list containing just this object is returned. If this object was split, a list of two objects is returned, containing the two new split objects. -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toPlainText(
{bool includeSemanticsLabels = true, bool includePlaceholders = true}) → String -
Flattens the InlineSpan tree into a single string.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → 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 brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
ttsCopyWith(
{Object? tag, String? text, List< InlineSpan> ? children, TextStyle? style, GestureRecognizer? recognizer, MouseCursor? mouseCursor, PointerEnterEventListener? onEnter, PointerExitEventListener? onExit, String? semanticsLabel, Locale? locale, bool? spellOut, bool noText = false, bool noChildren = false}) → TaggedTextSpan - Returns a copy of the TaggedTextSpan with optional changes.
-
visitChildren(
InlineSpanVisitor visitor) → bool -
Walks this TextSpan and its descendants in pre-order and calls
visitor
for each span that has text.inherited -
visitDirectChildren(
InlineSpanVisitor visitor) → bool -
Calls
visitor
for each immediate child of this InlineSpan.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override