SemanticsNode class
One semantics node from the captured tree.
Schema mirrors what the SemanticsCapture emits:
{id, role, label?, identifier?, value?, hint?, state?, actions?, rect}.
rect is a four-int list [left, top, right, bottom] in physical pixels.
identifier is the stable, locale-independent key from
Semantics(identifier:) — preferred for addressing a node across
locales/sessions, while label (rendered text) is what the model reads to
understand what the node is. value is a node's current contents — a text
field's text, or masked bullets for a secure field. hint is the node's
tooltip when it also has a rendered label; when a node has ONLY a tooltip
(an icon-only button) the host promotes that tooltip into label, so the
model reads one field for meaning. All four are empty when absent.
- Annotations
-
- @immutable
Constructors
Properties
-
actions
→ List<
String> -
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hint → String
-
The node's tooltip, when the node also carries a rendered label. Empty
otherwise — a tooltip-only node has its tooltip promoted into label by
the host, so this is never a duplicate of label.
final
- id → int
-
final
- identifier → String
-
Stable, locale-independent key from
Semantics(identifier:). Empty when the app sets none. Preferred for addressing a node; not a substitute for label when reasoning about what the node is.final - label → String
-
final
-
rect
→ List<
int> -
Bounding rect as
[left, top, right, bottom].final - role → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scroll
→ Map<
String, int> ? -
Scroll extent for scrollable nodes:
{pos, min?, max?}in logical pixels. Null for non-scrollable nodes. Surfaced so the model can scroll deliberately (it can movemax - posfurther;pos == maxis the end).final -
state
→ List<
String> -
final
- value → String
-
The node's current contents — a text field's text, or masked bullets for
a secure field. Empty when the node has none. Lets the model read what is
already typed instead of relying on the screenshot alone.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
tryFromJson(
Map< String, dynamic> j) → SemanticsNode? -
Decode a record. Returns
nullifidorrectis malformed; this keeps the harness defensive against partial wire payloads.