SemanticsNode class

A node that represents some semantic data.

The semantics tree is maintained during the semantics phase of the pipeline (i.e., during PipelineOwner.flushSemantics), which happens after compositing. The semantics tree is then uploaded into the engine for use by assistive technology.

Mixed in types

Constructors

SemanticsNode({Key? key, VoidCallback? showOnScreen})
Creates a semantic node.
SemanticsNode.root({Key? key, VoidCallback? showOnScreen, required SemanticsOwner owner})
Creates a semantic node to represent the root of the semantics tree.

Properties

areUserActionsBlocked bool
Whether the user can interact with this node in assistive technologies.
getter/setter pair
attached bool
Whether the semantics tree this node belongs to is attached to a SemanticsOwner.
no setter
attributedDecreasedValue AttributedString
The value in AttributedString format that value or attributedValue will have after a SemanticsAction.decrease action has been performed.
no setter
attributedHint AttributedString
A brief description of the result of performing an action on this node in AttributedString format.
no setter
attributedIncreasedValue AttributedString
The value in AttributedString format that value or attributedValue will have after a SemanticsAction.increase action has been performed.
no setter
attributedLabel AttributedString
A textual description of this node in AttributedString format.
no setter
attributedValue AttributedString
A textual description for the current value of the node in AttributedString format.
no setter
childrenCount int
The number of children this node has.
no setter
currentValueLength int?
The current number of characters that have been entered into an editable text field.
no setter
decreasedValue String
The value that value will have after a SemanticsAction.decrease action has been performed.
no setter
depth int
The depth of this node in the semantics tree.
no setter
elevation double
The elevation along the z-axis at which the rect of this SemanticsNode is located above its parent.
no setter
elevationAdjustment double?
The elevation adjustment that the parent imposes on this node.
getter/setter pair
hasChildren bool
Whether this node has a non-zero number of children.
no setter
hashCode int
The hash code for this object.
no setterinherited
hint String
A brief description of the result of performing an action on this node.
no setter
hintOverrides SemanticsHintOverrides?
Provides hint values which override the default hints on supported platforms.
no setter
id int
The unique identifier for this node.
no setter
identifier String
Provides an identifier for the semantics node in native accessibility hierarchy.
no setter
increasedValue String
The value that value will have after a SemanticsAction.increase action has been performed.
no setter
indexInParent int?
The index of this node within the parent's list of semantic children.
getter/setter pair
isInvisible bool
Whether the node is invisible.
no setter
isMergedIntoParent bool
Whether this node merges its semantic information into an ancestor node.
no setter
isMultiline bool?
If this node represents a text field, this indicates whether or not it's a multiline text field.
no setter
isPartOfNodeMerging bool
Whether this node is taking part in a merge of semantic information.
no setter
key Key?
Uniquely identifies this node in the list of sibling nodes.
final
label String
A textual description of this node.
no setter
maxValueLength int?
The maximum number of characters that can be entered into an editable text field.
no setter
mergeAllDescendantsIntoThisNode bool
Whether this node and all of its descendants should be treated as one logical entity.
no setter
owner SemanticsOwner?
The owner for this node (null if unattached).
no setter
parent SemanticsNode?
The parent of this node in the semantics tree.
no setter
parentPaintClipRect Rect?
The paint clip from an ancestor that was applied to this node.
getter/setter pair
parentSemanticsClipRect Rect?
The semantic clip from an ancestor that was applied to this node.
getter/setter pair
platformViewId int?
The id of the platform view, whose semantics nodes will be added as children to this node.
no setter
rect Rect
The bounding box for this node in its coordinate system.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollChildCount int?
The total number of scrollable children that contribute to semantics.
no setter
scrollExtentMax double?
Indicates the maximum in-range value for scrollPosition if the node is scrollable.
no setter
scrollExtentMin double?
Indicates the minimum in-range value for scrollPosition if the node is scrollable.
no setter
scrollIndex int?
The index of the first visible semantic child of a scroll node.
no setter
scrollPosition double?
Indicates the current scrolling position in logical pixels if the node is scrollable.
no setter
sortKey SemanticsSortKey?
Determines the position of this node among its siblings in the traversal sort order.
no setter
tags Set<SemanticsTag>?
The SemanticsTags this node is tagged with.
getter/setter pair
textDirection TextDirection?
The reading direction for label, value, hint, increasedValue, and decreasedValue.
no setter
textSelection TextSelection?
The currently selected text (or the position of the cursor) within value if this node represents a text field.
no setter
thickness double
Describes how much space the SemanticsNode takes up along the z-axis.
no setter
tooltip String
A textual description of the widget's tooltip.
no setter
transform Matrix4?
The transform from this node's coordinate system to its parent's coordinate system.
getter/setter pair
value String
A textual description for the current value of the node.
no setter

Methods

attach(SemanticsOwner owner) → void
Mark this node as attached to the given owner.
debugDescribeChildren({DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.inverseHitTest}) List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
debugListChildrenInOrder(DebugSemanticsDumpOrder childOrder) List<SemanticsNode>
Returns the list of direct children of this node in the specified order.
detach() → void
Mark this node as detached from its owner.
getSemanticsData() SemanticsData
Returns a summary of the semantics for this node.
hasFlag(SemanticsFlag flag) bool
Whether this node currently has a given SemanticsFlag.
isTagged(SemanticsTag tag) bool
Whether this node is tagged with tag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendEvent(SemanticsEvent event) → void
Sends a SemanticsEvent associated with this SemanticsNode.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style = DiagnosticsTreeStyle.sparse, DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.traversalOrder}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
override
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.traversalOrder}) String
Returns a string representation of this node and its descendants.
override
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.
override
updateWith({required SemanticsConfiguration? config, List<SemanticsNode>? childrenInInversePaintOrder}) → void
Reconfigures the properties of this object to describe the configuration provided in the config argument and the children listed in the childrenInInversePaintOrder argument.
visitChildren(SemanticsNodeVisitor visitor) → void
Visits the immediate children of this node.

Operators

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