@@ -8,21 +8,6 @@ import 'package:flutter/painting.dart';
8
8
9
9
export 'dart:ui' show TextDirection;
10
10
11
- /// Determines the assertiveness level of the accessibility announcement.
12
- ///
13
- /// It is used by [AnnounceSemanticsEvent] to determine the priority with which
14
- /// assistive technology should treat announcements.
15
- enum Assertiveness {
16
- /// The assistive technology will speak changes whenever the user is idle.
17
- polite,
18
-
19
- /// The assistive technology will interrupt any announcement that it is
20
- /// currently making to notify the user about the change.
21
- ///
22
- /// It should only be used for time-sensitive/critical notifications.
23
- assertive,
24
- }
25
-
26
11
/// An event sent by the application to notify interested listeners that
27
12
/// something happened to the user interface (e.g. a view scrolled).
28
13
///
@@ -86,7 +71,7 @@ abstract class SemanticsEvent {
86
71
class AnnounceSemanticsEvent extends SemanticsEvent {
87
72
88
73
/// Constructs an event that triggers an announcement by the platform.
89
- const AnnounceSemanticsEvent (this .message, this .textDirection, { this .assertiveness = Assertiveness .polite} )
74
+ const AnnounceSemanticsEvent (this .message, this .textDirection)
90
75
: assert (message != null ),
91
76
assert (textDirection != null ),
92
77
super ('announce' );
@@ -101,20 +86,11 @@ class AnnounceSemanticsEvent extends SemanticsEvent {
101
86
/// This property must not be null.
102
87
final TextDirection textDirection;
103
88
104
- /// Determines whether the announcement should interrupt any existing announcement,
105
- /// or queue after it.
106
- ///
107
- /// On the web this option uses the aria-live level to set the assertiveness
108
- /// of the announcement. On iOS, Android, Windows, Linux, macOS, and Fuchsia
109
- /// this option currently has no effect.
110
- final Assertiveness assertiveness;
111
-
112
89
@override
113
90
Map <String , dynamic > getDataMap () {
114
91
return < String , dynamic > {
115
92
'message' : message,
116
93
'textDirection' : textDirection.index,
117
- 'assertiveness' : assertiveness.index,
118
94
};
119
95
}
120
96
}
0 commit comments