SemanticsWrapper class Foundation

A class that builds semantics wrappers for custom UI items. Semantics are important, because they tell assistive technology and SEO crawlers information about the underlying elements.

Inheritance

Constructors

SemanticsWrapper.button({required bool? isEnabled, required dynamic label, required dynamic hint, required bool? isMutuallyExclusive})
Wrapper that governs a button
SemanticsWrapper.card({required dynamic isEnabled, required dynamic label})
SemanticsWrapper.collectionView({required bool? isEnabled, required dynamic label, required bool? isEditable})
Wrapper that governs a collection view of items
SemanticsWrapper.customItem({bool? isChecked = false, bool? isToggled = false, bool? isSelected = false, bool? isReadOnly = false, bool? isEditable = false, bool? isFocusable = false, bool? isMutuallyExclusive = false, bool? isHidden = false, bool? isObscured = false, bool? isMultiline = false, bool? isLiveRegion = false, dynamic value, dynamic hint, required bool? isEnabled, required dynamic label})
Wrapper that governs a custom item
SemanticsWrapper.header({required dynamic label})
Wrapper that governs a header that divides a page
SemanticsWrapper.ignorable()
Wrapper that declares an item that can be ignored
SemanticsWrapper.progressIndicator({required dynamic hint, required dynamic value})
Wrapper that governs a progress indicator
SemanticsWrapper.slider({required bool? isEnabled, required dynamic hint, required dynamic value})
Wrapper that governs a slider
SemanticsWrapper.tabBar({required bool? isEnabled, required dynamic label, required dynamic hint, required bool? isSelected})
Wrapper that governs a tab bar
SemanticsWrapper.textField({required dynamic label, required dynamic hint, dynamic value = 'Blank text field', required bool? isEditable})
Wrapper that governs a text field with one line
SemanticsWrapper.textView({required dynamic label, required dynamic hint, dynamic value = 'Blank text view', required bool? isEditable})
Wrapper that governs a text view with multiple lines
SemanticsWrapper.toggle({required bool? isEnabled, required bool? isToggled, required bool? isMutuallyExclusive})
Wrapper that governs a toggle
SemanticsWrapper.view({required dynamic label, required dynamic hint})
Wrapper that governs a view

Properties

attributedDecreasedValue AttributedString?
The AttributedString that value or attributedValue will become after a SemanticsAction.decrease action has been performed on this widget.
finalinherited
attributedHint AttributedString?
Provides an AttributedString version of brief textual description of the result of an action performed on the widget.
finalinherited
attributedIncreasedValue AttributedString?
The AttributedString that value or attributedValue will become after a SemanticsAction.increase action has been performed on this widget.
finalinherited
attributedLabel AttributedString?
Provides an AttributedString version of textual description of the widget.
finalinherited
attributedValue AttributedString?
Provides an AttributedString version of textual description of the value of the widget.
finalinherited
button bool?
If non-null, indicates that this subtree represents a button.
finalinherited
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.
finalinherited
currentValueLength int?
The current number of characters that have been entered into an editable text field.
finalinherited
customSemanticsActions Map<CustomSemanticsAction, VoidCallback>?
A map from each supported CustomSemanticsAction to a provided handler.
finalinherited
decreasedValue String?
The value that value or attributedValue will become after a SemanticsAction.decrease action has been performed on this widget.
finalinherited
enabled bool?
If non-null, indicates that this subtree represents something that can be in an enabled or disabled state.
finalinherited
expanded bool?
If non-null, indicates that this subtree represents something that can be in an "expanded" or "collapsed" state.
finalinherited
focusable bool?
If non-null, whether the node is able to hold input focus.
finalinherited
focused bool?
If non-null, whether the node currently holds input focus.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
If non-null, indicates that this subtree represents a header.
finalinherited
hidden bool?
If non-null, whether the node is considered hidden.
finalinherited
hint String?
Provides a brief textual description of the result of an action performed on the widget.
finalinherited
hintOverrides SemanticsHintOverrides?
Provides hint values which override the default hints on supported platforms.
finalinherited
identifier String?
Provides an identifier for the semantics node in native accessibility hierarchy.
finalinherited
image bool?
If non-null, whether the node represents an image.
finalinherited
increasedValue String?
The value that value or attributedValue will become after a SemanticsAction.increase action has been performed on this widget.
finalinherited
inMutuallyExclusiveGroup bool?
If non-null, whether a semantic node is in a mutually exclusive group.
finalinherited
isChecked bool?
Is able to be interacted with / selected.
getter/setter pair
isEditable bool?
Is able to have value edited / changed
getter/setter pair
isEnabled bool?
Is enabled for user interactions
getter/setter pair
isFocusable bool?
Is able to be uniquely focused on.
getter/setter pair
isHidden bool?
Is not shown on the screen.
getter/setter pair
isLiveRegion bool?
Is a temporary / time sensitive item that will disappear. Makes an annoucement over VoiceReaders
getter/setter pair
isMultiline bool?
Is a piece of text that has multiple lines
getter/setter pair
isMutuallyExclusive bool?
Is a mutually exclusive interactable. If one is selected, all of the others are not.
getter/setter pair
isObscured bool?
Is obscured on the screen, but can be visible.
getter/setter pair
isReadOnly bool?
Is non-interactable and read only
getter/setter pair
isSelected bool?
Is selected and focused if in a group
getter/setter pair
isToggled bool?
Is toggled on if it's a switch component
getter/setter pair
keyboardKey bool?
If non-null, indicates that this subtree represents a keyboard key.
finalinherited
label String?
Provides a textual description of the widget.
finalinherited
If non-null, indicates that this subtree represents a link.
finalinherited
liveRegion bool?
If non-null, whether the node should be considered a live region.
finalinherited
maxValueLength int?
The maximum number of characters that can be entered into an editable text field.
finalinherited
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.
finalinherited
multiline bool?
Whether the value is coming from a field that supports multiline text editing.
finalinherited
namesRoute bool?
If non-null, whether the node contains the semantic label for a route.
finalinherited
obscured bool?
If non-null, whether value should be obscured.
finalinherited
onCopy VoidCallback?
The handler for SemanticsAction.copy.
finalinherited
onCut VoidCallback?
The handler for SemanticsAction.cut.
finalinherited
onDecrease VoidCallback?
The handler for SemanticsAction.decrease.
finalinherited
onDidGainAccessibilityFocus VoidCallback?
The handler for SemanticsAction.didGainAccessibilityFocus.
finalinherited
onDidLoseAccessibilityFocus VoidCallback?
The handler for SemanticsAction.didLoseAccessibilityFocus.
finalinherited
onDismiss VoidCallback?
The handler for SemanticsAction.dismiss.
finalinherited
onIncrease VoidCallback?
The handler for SemanticsAction.increase.
finalinherited
onLongPress VoidCallback?
The handler for SemanticsAction.longPress.
finalinherited
onMoveCursorBackwardByCharacter MoveCursorHandler?
The handler for SemanticsAction.moveCursorBackwardByCharacter.
finalinherited
onMoveCursorBackwardByWord MoveCursorHandler?
The handler for SemanticsAction.moveCursorBackwardByWord.
finalinherited
onMoveCursorForwardByCharacter MoveCursorHandler?
The handler for SemanticsAction.moveCursorForwardByCharacter.
finalinherited
onMoveCursorForwardByWord MoveCursorHandler?
The handler for SemanticsAction.moveCursorForwardByWord.
finalinherited
onPaste VoidCallback?
The handler for SemanticsAction.paste.
finalinherited
onScrollDown VoidCallback?
The handler for SemanticsAction.scrollDown.
finalinherited
onScrollLeft VoidCallback?
The handler for SemanticsAction.scrollLeft.
finalinherited
onScrollRight VoidCallback?
The handler for SemanticsAction.scrollRight.
finalinherited
onScrollUp VoidCallback?
The handler for SemanticsAction.scrollUp.
finalinherited
onSetSelection SetSelectionHandler?
The handler for SemanticsAction.setSelection.
finalinherited
onSetText SetTextHandler?
The handler for SemanticsAction.setText.
finalinherited
onTap VoidCallback?
The handler for SemanticsAction.tap.
finalinherited
readOnly bool?
If non-null, indicates that this subtree is read only.
finalinherited
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.
finalinherited
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.
finalinherited
slider bool?
If non-null, indicates that this subtree represents a slider.
finalinherited
sortKey SemanticsSortKey?
Determines the position of this node among its siblings in the traversal sort order.
finalinherited
tagForChildren SemanticsTag?
A tag to be applied to the child SemanticsNodes of this widget.
finalinherited
textDirection TextDirection?
The reading direction of the label, value, increasedValue, decreasedValue, and hint.
finalinherited
textField bool?
If non-null, indicates that this subtree represents a text field.
finalinherited
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.
finalinherited
tooltip String?
Provides a textual description of the widget's tooltip.
finalinherited
value String?
Provides a textual description of the value of the widget.
finalinherited

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.
inherited
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.
inherited

Operators

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