Unverified Commit 19b97ae5 authored by Dan Field's avatar Dan Field Committed by GitHub

Doc clarifications for semantics properties (#24544)

* update semantics properties doc
parent becad5fb
......@@ -3171,6 +3171,11 @@ class SemanticsConfiguration {
}
/// Whether the owning [RenderObject] is selected (true) or not (false).
///
/// This is different from having accessibility focus. The element that is
/// accessibility focused may or may not be selected; e.g. a [ListTile] can have
/// accessibility focus but have its [ListTile.selected] property set to false,
/// in which case it will not be flagged as selected.
bool get isSelected => _hasFlag(SemanticsFlag.isSelected);
set isSelected(bool value) {
_setFlag(SemanticsFlag.isSelected, value);
......@@ -3187,6 +3192,10 @@ class SemanticsConfiguration {
///
/// The getter will return null if the owning [RenderObject] doesn't support
/// the concept of being enabled/disabled.
///
/// This property does not control whether semantics are enabled. If you wish to
/// disable semantics for a particular widget, you should use an [ExcludeSemantics]
/// widget.
bool get isEnabled => _hasFlag(SemanticsFlag.hasEnabledState) ? _hasFlag(SemanticsFlag.isEnabled) : null;
set isEnabled(bool value) {
_setFlag(SemanticsFlag.hasEnabledState, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment