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({CheckedState isChecked = CheckedState.none, Tristate isSelected = Tristate.none, Tristate isEnabled = Tristate.none, Tristate isToggled = Tristate.none, Tristate isExpanded = Tristate.none, Tristate isRequired = Tristate.none, Tristate isFocused = Tristate.none, bool isButton = false, bool isTextField = 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 hasImplicitScrolling = false, bool isMultiline = false, bool isReadOnly = false, bool isLink = false, bool isSlider = false, bool isKeyboardKey = false, bool isAccessibilityFocusBlocked = false})
Creates a set of semantics flags that describe various states of a widget. All flags default to false unless specified.

Properties

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
isAccessibilityFocusBlocked → bool
whether this node's accessibility focus is blocked.
final
isButton → bool
Whether the semantic node represents a button.
final
isChecked → CheckedState
The semantics node has the quality of either being "checked" or "unchecked".
final
isEnabled → Tristate
Whether a semantic node that hasEnabledState is currently enabled.
final
isExpanded → Tristate
Whether a semantics node is expanded.
final
isFocused → Tristate
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 → Tristate
Whether a semantics node is required.
final
isSelected → Tristate
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 → Tristate
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({CheckedState? isChecked, Tristate? isSelected, Tristate? isEnabled, Tristate? isToggled, Tristate? isExpanded, Tristate? isRequired, Tristate? isFocused, bool? isButton, bool? isTextField, bool? isInMutuallyExclusiveGroup, bool? isHeader, bool? isObscured, bool? scopesRoute, bool? namesRoute, bool? isHidden, bool? isImage, bool? isLiveRegion, bool? hasImplicitScrolling, bool? isMultiline, bool? isReadOnly, bool? isLink, bool? isSlider, bool? isKeyboardKey, bool? isAccessibilityFocusBlocked}) → SemanticsFlags
Copy the semantics flags, with some of them optionally replaced.
hasConflictingFlags(SemanticsFlags other) → bool
Checks if any flags are conflicted in this instance and the other instance.
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