From 19b97ae5154c9af6f5957a82ef3504b6233ff825 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 19 Nov 2018 23:14:04 -0800 Subject: [PATCH] Doc clarifications for semantics properties (#24544) * update semantics properties doc --- packages/flutter/lib/src/semantics/semantics.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index 4b938d778b..45154d8de1 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -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);