RefEntry class

A single addressable entry stored in RefRegistry.

Each entry pairs an [ref=eN] token (minted by RefRegistry.register) with the live tree references the V3 action tools (Steps 7–14) need to resolve the ref back to a hit point or focus target.

Two field groups:

Hot-path fields (every action tool reads these):

  • rect — bounding rect in logical pixels (global coordinates), captured at registration. Pointer-event extensions hit at rect.center.
  • element — the Element backing the registered tree node. The text- input extension walks descendants for EditableText.of(...); the scroll extension passes the element to Scrollable.maybeOf(...).
  • isTextFieldtrue when the registered node has the SemanticsFlag.isTextField flag. The tap extension uses this signal to call requestKeyboard() after the pointer events (Step 1 spike verified the chain produces hasPrimaryFocus == true).
  • groupId — identifies the snapshot (or find_by_* call) that minted the token. Disposing the group via RefRegistry.disposeGroup removes every entry under it atomically.

Inspection fields (snapshot enrichment / debugging):

  • node — the SemanticsNode the entry was minted from, when the entry came from a Semantics-tree walk. null for synthetic entries (e.g. find_by_text, which walks the Element tree directly).
  • renderObject — the RenderObject backing the node, captured at registration. Useful for tools that want to recompute the rect under a different transform without re-walking the tree.

Constructors

RefEntry({required Rect rect, required Element element, required String groupId, required bool isTextField, SemanticsNode? node, RenderObject? renderObject})
Creates a RefEntry from its component parts. All non-nullable fields must be provided; the registry never mutates an entry after registration.
const

Properties

element Element
The Element backing the registered tree node.
final
groupId String
Snapshot group that owns this entry. Disposing the group removes the entry.
final
hashCode int
The hash code for this object.
no setterinherited
isTextField bool
Whether this ref points to a text-input widget.
final
node SemanticsNode?
The SemanticsNode the entry was minted from, when the entry came from a Semantics-tree walk. null for synthetic entries (e.g. find_by_text).
final
rect Rect
Bounding rect in logical pixels (global coordinates).
final
renderObject RenderObject?
The RenderObject backing the registered tree node.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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