SemanticsHandle class

A reference to the semantics tree.

The framework maintains the semantics tree (used for accessibility and indexing) only when there is at least one client holding an open SemanticsHandle.

The framework notifies the client that it has updated the semantics tree by calling the listener callback. When the client no longer needs the semantics tree, the client can call dispose on the SemanticsHandle, which stops these callbacks and closes the SemanticsHandle. When all the outstanding SemanticsHandle objects are closed, the framework stops updating the semantics tree.

To obtain a SemanticsHandle, call PipelineOwner.ensureSemantics on the PipelineOwner for the render tree from which you wish to read semantics. You can obtain the PipelineOwner using the RenderObject.owner property.

Properties

listener VoidCallback
The callback that will be notified when the semantics tree updates.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
Closes the semantics handle and stops calling listener when the semantics updates. [...]
@mustCallSuper
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(other) bool
The equality operator. [...]
inherited