SemanticsFlags class

Represents a collection of boolean flags that convey semantic information about a widget's accessibility state and properties.

For example, These flags can indicate if an element is checkable, currently checked, selectable, or functions as a button.

Constructors

SemanticsFlags.new({bool hasCheckedState = false, bool isChecked = false, bool isSelected = false, bool isButton = false, bool isTextField = false, bool isFocused = false, bool hasEnabledState = false, bool isEnabled = false, bool isInMutuallyExclusiveGroup = false, bool isHeader = false, bool isObscured = false, bool scopesRoute = false, bool namesRoute = false, bool isHidden = false, bool isImage = false, bool isLiveRegion = false, bool hasToggledState = false, bool isToggled = false, bool hasImplicitScrolling = false, bool isMultiline = false, bool isReadOnly = false, bool isFocusable = false, bool isLink = false, bool isSlider = false, bool isKeyboardKey = false, bool isCheckStateMixed = false, bool hasExpandedState = false, bool isExpanded = false, bool hasSelectedState = false, bool hasRequiredState = false, bool isRequired = false})
Creates a set of semantics flags that describe various states of a widget. All flags default to false unless specified.

Properties

hasCheckedState bool
The semantics node has the quality of either being "checked" or "unchecked".
final
hasEnabledState bool
The semantics node has the quality of either being "enabled" or "disabled".
final
hasExpandedState bool
The semantics node has the quality of either being "expanded" or "collapsed".
final
hashCode int
The hash code for this object.
no setteroverride
hasImplicitScrolling bool
Whether the platform can scroll the semantics node when the user attempts to move focus to an offscreen child.
final
hasRequiredState bool
The semantics node has the quality of either being required or not.
final
hasSelectedState bool
The semantics node has the quality of either being "selected" or "unselected".
final
hasToggledState bool
The semantics node has the quality of either being "on" or "off".
final
isButton bool
Whether the semantic node represents a button.
final
isChecked bool
Whether a semantics node that hasCheckedState is checked.
final
isCheckStateMixed bool
Whether a tristate checkbox is in its mixed state.
final
isEnabled bool
Whether a semantic node that hasEnabledState is currently enabled.
final
isExpanded bool
Whether a semantics node is expanded.
final
isFocusable bool
Whether the semantic node is able to hold the user's focus.
final
isFocused bool
Whether the semantic node currently holds the user's focus.
final
isHeader bool
Whether a semantic node is a header that divides content into sections.
final
isHidden bool
Whether the semantics node is considered hidden.
final
isImage bool
Whether the semantics node represents an image.
final
isInMutuallyExclusiveGroup bool
Whether a semantic node is in a mutually exclusive group.
final
isKeyboardKey bool
Whether the semantic node represents a keyboard key.
final
Whether the semantic node is an interactive link.
final
isLiveRegion bool
Whether the semantics node is a live region.
final
isMultiline bool
Whether the value of the semantics node is coming from a multi-line text field.
final
isObscured bool
Whether the value of the semantics node is obscured.
final
isReadOnly bool
Whether the semantic node is read only.
final
isRequired bool
Whether a semantics node is required.
final
isSelected bool
Whether a semantics node is selected.
final
isSlider bool
Whether the semantic node represents a slider.
final
isTextField bool
Whether the semantic node represents a text field.
final
isToggled bool
If true, the semantics node is "on". If false, the semantics node is "off".
final
namesRoute bool
Whether the semantics node label is the name of a visually distinct route.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopesRoute bool
Whether the semantics node is the root of a subtree for which a route name should be announced.
final

Methods

copyWith({bool? hasCheckedState, bool? isChecked, bool? isSelected, bool? isButton, bool? isTextField, bool? isFocused, bool? hasEnabledState, bool? isEnabled, bool? isInMutuallyExclusiveGroup, bool? isHeader, bool? isObscured, bool? scopesRoute, bool? namesRoute, bool? isHidden, bool? isImage, bool? isLiveRegion, bool? hasToggledState, bool? isToggled, bool? hasImplicitScrolling, bool? isMultiline, bool? isReadOnly, bool? isFocusable, bool? isLink, bool? isSlider, bool? isKeyboardKey, bool? isCheckStateMixed, bool? hasExpandedState, bool? isExpanded, bool? hasSelectedState, bool? hasRequiredState, bool? isRequired}) SemanticsFlags
Copy the semantics flags, with some of them optionally replaced.
hasRepeatedFlags(SemanticsFlags other) bool
Checks if any of the boolean semantic flags are set to true in both this instance and the other instance.
merge(SemanticsFlags other) SemanticsFlags
Combines two sets of flags, such that if a flag it set to true in any of the two sets, the resulting set contains that flag set to true.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toStrings() List<String>
Convert flags to a list of string.

Operators

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

Static Properties

none SemanticsFlags
The set of semantics flags with every flag set to false.
getter/setter pair