From c0283d85f550b1a834126ef99a40871e9b52a0ba Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 2 Dec 2019 19:08:01 -0800 Subject: [PATCH] Deprecate UpdateLiveRegionEvent (#45940) --- .../flutter/lib/src/semantics/semantics.dart | 21 +++++++------------ .../lib/src/semantics/semantics_event.dart | 6 ++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index 51489cee3a..93e67d7e82 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -788,12 +788,10 @@ class SemanticsProperties extends DiagnosticableTree { /// If non-null, whether the node should be considered a live region. /// - /// On Android, when a live region semantics node is first created TalkBack - /// will make a polite announcement of the current label. This announcement - /// occurs even if the node is not focused. Subsequent polite announcements - /// can be made by sending a [UpdateLiveRegionEvent] semantics event. The - /// announcement will only be made if the node's label has changed since the - /// last update. + /// On Android, when the label changes on a live region semantics node, + /// TalkBack will make a polite announcement of the current label. This + /// announcement occurs even if the node is not focused, but only if the label + /// has changed since the last update. /// /// On iOS, no announcements are made but the node is marked as /// `UIAccessibilityTraitUpdatesFrequently`. @@ -807,7 +805,6 @@ class SemanticsProperties extends DiagnosticableTree { /// /// * [SemanticsFlag.liveRegion], the semantics flag this setting controls. /// * [SemanticsConfiguration.liveRegion], for a full description of a live region. - /// * [UpdateLiveRegionEvent], to trigger a polite announcement of a live region. final bool liveRegion; /// The maximum number of characters that can be entered into an editable @@ -3522,12 +3519,10 @@ class SemanticsConfiguration { /// Whether the semantics node is a live region. /// - /// On Android, when a live region semantics node is first created TalkBack - /// will make a polite announcement of the current label. This announcement - /// occurs even if the node is not focused. Subsequent polite announcements - /// can be made by sending a [UpdateLiveRegionEvent] semantics event. The - /// announcement will only be made if the node's label has changed since the - /// last update. + /// On Android, when the label changes on a live region semantics node, + /// TalkBack will make a polite announcement of the current label. This + /// announcement occurs even if the node is not focused, but only if the label + /// has changed since the last update. /// /// An example of a live region is the [Snackbar] widget. When it appears /// on the screen it may be difficult to focus to read the label. A live diff --git a/packages/flutter/lib/src/semantics/semantics_event.dart b/packages/flutter/lib/src/semantics/semantics_event.dart index d786b4a348..66c88e46f5 100644 --- a/packages/flutter/lib/src/semantics/semantics_event.dart +++ b/packages/flutter/lib/src/semantics/semantics_event.dart @@ -144,6 +144,12 @@ class TapSemanticEvent extends SemanticsEvent { /// See also: /// /// * [SemanticsFlag.liveRegion], for a description of live regions. +/// +/// Deprecated. This message was never implemented, and references to it should be removed. +@Deprecated( + 'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. ' + 'This feature was deprecated after v1.12.16.' +) class UpdateLiveRegionEvent extends SemanticsEvent { /// Creates a new [UpdateLiveRegionEvent]. const UpdateLiveRegionEvent() : super('updateLiveRegion');