A widget that annotates the widget tree with a description of the meaning of the widgets.
Used by accessibility tools, search engines, and other semantic analysis software to determine the meaning of the application.
See also:
- MergeSemantics, which marks a subtree as being a single node for accessibility purposes.
- ExcludeSemantics, which excludes a subtree from the semantics tree (which might be useful if it is, e.g., totally decorative and not important to the user).
- RenderObject.semanticsAnnotator, the rendering library API through which the Semantics widget is actually implemented.
- SemanticsNode, the object used by the rendering library to represent semantics in the semantics tree.
- SemanticsDebugger, an overlay to help visualize the semantics tree. Can
be enabled using showSemanticsDebugger or
MaterialApp.showSemanticsDebugger
.
- Inheritance
Constructors
Properties
- checked → bool
-
If non-null, indicates that this subtree represents a checkbox or similar widget with a "checked" state, and what its current state is.
read-only - container → bool
-
If 'container' is true, this Widget will introduce a new node in the semantics tree. Otherwise, the semantics will be merged with the semantics of any ancestors.
read-only - label → String
-
Provides a textual description of the widget.
read-only - child → Widget
-
The widget below this widget in the tree.
read-only, inherited - hashCode → int
-
Get a hash code for this object.
read-only, inherited - key → Key
-
Controls how one widget replaces another widget in the tree.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
createRenderObject(
BuildContext context) → RenderSemanticsAnnotations -
Creates an instance of the
RenderObject
class that thisRenderObjectWidget
represents, using the configuration described by thisRenderObjectWidget
. -
debugFillDescription(
List<String> description) → void -
Add additional information to the given description for use by
toString
. -
updateRenderObject(
BuildContext context, RenderSemanticsAnnotations renderObject) → void -
Copies the configuration described by this
RenderObjectWidget
to the givenRenderObject
, which will be of the same type as returned by this object'screateRenderObject
. -
createElement(
) → SingleChildRenderObjectElement -
RenderObjectWidgets always inflate to a
RenderObjectElement
subclass.inherited -
didUnmountRenderObject(
RenderObject renderObject) → void -
A render object previously associated with this widget has been removed from the tree. The given RenderObject will be of the same type as returned by this object's createRenderObject.
inherited -
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 -
toStringShort(
) → String -
A short, textual description of this widget.
inherited