UiNode class
A node as exposed by the SDK's tree pipeline.
Constructors
-
UiNode({required String stableId, required String role, required String text, required String normalizedText, required List<
String> normalizedTokens, required Rect bounds, required bool scrollable, required bool visible, required double visibleFraction, required int layer, required bool hasAction, required String identifier, required List<String> actions, required String subtreeText, required int rawId, bool selected = false, String value = '', String? checked, bool editable = false, bool secure = false, bool coversViewport = false, int overlayId = 0, bool? disabled, String placeholder = '', UiRange? range, String parentId = '', VisualSignature? visual}) -
const
Properties
-
actions
→ List<
String> -
final
- bounds → Rect
-
final
- checked → String?
-
Tri-state checked/toggled state:
'true'/'false'/'mixed', null when the node has neither state family.final - coversViewport → bool
-
truewhen the node's bounds cover at least kSubtreeTextOmitCoverage of the viewport at capture time (page root, full-height scroll view). Such a node'ssubtree_textwould be the whole screen's text, which the backend can never use as a "tightest container" or a distinguishing owner label, so toWire leaves it out. In-memory subtreeText is untouched — the on-device explorer still sees it.final - disabled → bool?
-
Measured enablement, tri-state:
truedisabled,falseenabled, null when the node reports no enabled state (omitted from the wire).final - editable → bool
-
SemanticsFlag.isTextField— the only nodesset_textcan drive.final - hasAction → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
final
- layer → int
-
Modal stacking depth; ordinary page nodes stay on layer zero.
final
- normalizedText → String
-
Lowercased / whitespace-collapsed / punctuation-flattened form of
text.final -
normalizedTokens
→ List<
String> -
Token bag derived from
normalizedText(single-space split, empty entries dropped).final - overlayId → int
-
Capture-local grouping; never serialized as a durable surface identity.
final
- parentId → String
-
Stable id of the nearest kept ancestor, '' for a root (Android
parent_id). The backend walks it for owner labels and the slider sibling redirect.final - placeholder → String
-
An input field's hint text (
SemanticsData.hint); editable nodes only.final - range → UiRange?
-
A slider's
{min, max, step}when the host reported its bounds.final - rawId → int
-
Live SemanticsNode.id at the moment of capture.
final
- role → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollable → bool
-
final
- secure → bool
-
SemanticsFlag.isObscured— password/PIN fields.final - selected → bool
-
truewhen the host widget carriesSemanticsFlag.isSelected(the active tab of aBottomNavigationBar/NavigationBar/TabBar, a selectedChip, etc.). The SDK's generic back-navigation reads this to detect "which tab was active before this tap" — no host code required.final - stableId → String
-
final
- subtreeText → String
-
normalizedTextof this node concatenated with that of every kept descendant (single-space joined).final - text → String
-
final
- value → String
-
The control's current value — a text field's contents, a slider's "50%", a
dropdown's selection.
final
- visible → bool
-
final
- visibleFraction → double
-
Fraction of the node's bounds inside the viewport, in
[0.0, 1.0].final - visual → VisualSignature?
-
How the node is drawn (NormalizedNode.visual), null when the capture
did not look. In-memory only — toWire never sends it.
final
- wireNormalizedText → String
-
normalized_textas the backend holds it after toWire: the SDK's normalization, ortext.lower()when the key is omitted / empty (UiNode.from_wire).no setter - wireSubtreeText → String?
-
subtree_textexactly as toWire sends it, or null when omitted.no setter - wireVisibleFraction → double
-
visible_fractionat wire precision (two decimals).no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toWire(
) → Map< String, dynamic> - Backend-bound representation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited