SemanticsProperties class

Contains properties used by assistive technologies to make the application more accessible.

The properties of this class are used to generate a SemanticsNodes in the semantics tree.

Inheritance
Annotations

Constructors

SemanticsProperties({bool? enabled, bool? checked, bool? mixed, bool? expanded, bool? selected, bool? toggled, bool? button, bool? link, bool? header, int? headingLevel, bool? textField, bool? slider, bool? keyboardKey, bool? readOnly, bool? focusable, bool? focused, bool? inMutuallyExclusiveGroup, bool? hidden, bool? obscured, bool? multiline, bool? scopesRoute, bool? namesRoute, bool? image, bool? liveRegion, int? maxValueLength, int? currentValueLength, String? identifier, String? label, AttributedString? attributedLabel, String? value, AttributedString? attributedValue, String? increasedValue, AttributedString? attributedIncreasedValue, String? decreasedValue, AttributedString? attributedDecreasedValue, String? hint, String? tooltip, AttributedString? attributedHint, SemanticsHintOverrides? hintOverrides, TextDirection? textDirection, SemanticsSortKey? sortKey, SemanticsTag? tagForChildren, VoidCallback? onTap, VoidCallback? onLongPress, VoidCallback? onScrollLeft, VoidCallback? onScrollRight, VoidCallback? onScrollUp, VoidCallback? onScrollDown, VoidCallback? onIncrease, VoidCallback? onDecrease, VoidCallback? onCopy, VoidCallback? onCut, VoidCallback? onPaste, MoveCursorHandler? onMoveCursorForwardByCharacter, MoveCursorHandler? onMoveCursorBackwardByCharacter, MoveCursorHandler? onMoveCursorForwardByWord, MoveCursorHandler? onMoveCursorBackwardByWord, SetSelectionHandler? onSetSelection, SetTextHandler? onSetText, VoidCallback? onDidGainAccessibilityFocus, VoidCallback? onDidLoseAccessibilityFocus, VoidCallback? onFocus, VoidCallback? onDismiss, Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions})
Creates a semantic annotation.
const

Properties

attributedDecreasedValue AttributedString?
The AttributedString that value or attributedValue will become after a SemanticsAction.decrease action has been performed on this widget.
final
attributedHint AttributedString?
Provides an AttributedString version of brief textual description of the result of an action performed on the widget.
final
attributedIncreasedValue AttributedString?
The AttributedString that value or attributedValue will become after a SemanticsAction.increase action has been performed on this widget.
final
attributedLabel AttributedString?
Provides an AttributedString version of textual description of the widget.
final
attributedValue AttributedString?
Provides an AttributedString version of textual description of the value of the widget.
final
button bool?
If non-null, indicates that this subtree represents a button.
final
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.
final
currentValueLength int?
The current number of characters that have been entered into an editable text field.
final
customSemanticsActions Map<CustomSemanticsAction, VoidCallback>?
A map from each supported CustomSemanticsAction to a provided handler.
final
decreasedValue String?
The value that value or attributedValue will become after a SemanticsAction.decrease action has been performed on this widget.
final
enabled bool?
If non-null, indicates that this subtree represents something that can be in an enabled or disabled state.
final
expanded bool?
If non-null, indicates that this subtree represents something that can be in an "expanded" or "collapsed" state.
final
focusable bool?
If non-null, whether the node is able to hold input focus.
final
focused bool?
If non-null, whether the node currently holds input focus.
final
hashCode int
The hash code for this object.
no setterinherited
If non-null, indicates that this subtree represents a header.
final
headingLevel int?
The heading level in the DOM document structure.
final
hidden bool?
If non-null, whether the node is considered hidden.
final
hint String?
Provides a brief textual description of the result of an action performed on the widget.
final
hintOverrides SemanticsHintOverrides?
Provides hint values which override the default hints on supported platforms.
final
identifier String?
Provides an identifier for the semantics node in native accessibility hierarchy.
final
image bool?
If non-null, whether the node represents an image.
final
increasedValue String?
The value that value or attributedValue will become after a SemanticsAction.increase action has been performed on this widget.
final
inMutuallyExclusiveGroup bool?
If non-null, whether a semantic node is in a mutually exclusive group.
final
keyboardKey bool?
If non-null, indicates that this subtree represents a keyboard key.
final
label String?
Provides a textual description of the widget.
final
If non-null, indicates that this subtree represents a link.
final
liveRegion bool?
If non-null, whether the node should be considered a live region.
final
maxValueLength int?
The maximum number of characters that can be entered into an editable text field.
final
mixed bool?
If non-null, indicates that this subtree represents a checkbox or similar widget with a "half-checked" state or similar, and whether it is currently in this half-checked state.
final
multiline bool?
Whether the value is coming from a field that supports multiline text editing.
final
namesRoute bool?
If non-null, whether the node contains the semantic label for a route.
final
obscured bool?
If non-null, whether value should be obscured.
final
onCopy VoidCallback?
The handler for SemanticsAction.copy.
final
onCut VoidCallback?
The handler for SemanticsAction.cut.
final
onDecrease VoidCallback?
The handler for SemanticsAction.decrease.
final
onDidGainAccessibilityFocus VoidCallback?
The handler for SemanticsAction.didGainAccessibilityFocus.
final
onDidLoseAccessibilityFocus VoidCallback?
The handler for SemanticsAction.didLoseAccessibilityFocus.
final
onDismiss VoidCallback?
The handler for SemanticsAction.dismiss.
final
onFocus VoidCallback?
The handler for SemanticsAction.focus.
final
onIncrease VoidCallback?
The handler for SemanticsAction.increase.
final
onLongPress VoidCallback?
The handler for SemanticsAction.longPress.
final
onMoveCursorBackwardByCharacter MoveCursorHandler?
The handler for SemanticsAction.moveCursorBackwardByCharacter.
final
onMoveCursorBackwardByWord MoveCursorHandler?
The handler for SemanticsAction.moveCursorBackwardByWord.
final
onMoveCursorForwardByCharacter MoveCursorHandler?
The handler for SemanticsAction.moveCursorForwardByCharacter.
final
onMoveCursorForwardByWord MoveCursorHandler?
The handler for SemanticsAction.moveCursorForwardByWord.
final
onPaste VoidCallback?
The handler for SemanticsAction.paste.
final
onScrollDown VoidCallback?
The handler for SemanticsAction.scrollDown.
final
onScrollLeft VoidCallback?
The handler for SemanticsAction.scrollLeft.
final
onScrollRight VoidCallback?
The handler for SemanticsAction.scrollRight.
final
onScrollUp VoidCallback?
The handler for SemanticsAction.scrollUp.
final
onSetSelection SetSelectionHandler?
The handler for SemanticsAction.setSelection.
final
onSetText SetTextHandler?
The handler for SemanticsAction.setText.
final
onTap VoidCallback?
The handler for SemanticsAction.tap.
final
readOnly bool?
If non-null, indicates that this subtree is read only.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopesRoute bool?
If non-null, whether the node corresponds to the root of a subtree for which a route name should be announced.
final
selected bool?
If non-null indicates that this subtree represents something that can be in a selected or unselected state, and what its current state is.
final
slider bool?
If non-null, indicates that this subtree represents a slider.
final
sortKey SemanticsSortKey?
Determines the position of this node among its siblings in the traversal sort order.
final
tagForChildren SemanticsTag?
A tag to be applied to the child SemanticsNodes of this widget.
final
textDirection TextDirection?
The reading direction of the label, value, increasedValue, decreasedValue, and hint.
final
textField bool?
If non-null, indicates that this subtree represents a text field.
final
toggled bool?
If non-null, indicates that this subtree represents a toggle switch or similar widget with an "on" state, and what its current state is.
final
tooltip String?
Provides a textual description of the widget's tooltip.
final
value String?
Provides a textual description of the value of the widget.
final

Methods

debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
override

Operators

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