Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d68444f

Browse files
authored
SemanticsFlag/SemanticsAction enum migration (part 1) (#40571)
`SemanticsFlag`/`SemanticsAction` enum migration (part 1)
1 parent 0ea89c3 commit d68444f

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

lib/ui/semantics.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,16 @@ class SemanticsAction {
228228
_kSetTextIndex: setText,
229229
};
230230

231+
/// Temporary API until [values] return a list.
232+
/// https://github.com/flutter/flutter/issues/123346
233+
@Deprecated('This getter is temporary and will be removed shortly.')
234+
static List<SemanticsAction> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
235+
236+
/// Temporary API until [values] return a list.
237+
/// https://github.com/flutter/flutter/issues/123346
238+
@Deprecated('This getter is temporary and will be removed shortly.')
239+
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
240+
231241
@override
232242
String toString() {
233243
switch (index) {
@@ -598,6 +608,16 @@ class SemanticsFlag {
598608
_kIsCheckStateMixedIndex: isCheckStateMixed,
599609
};
600610

611+
/// Temporary API until [values] return a list.
612+
/// https://github.com/flutter/flutter/issues/123346
613+
@Deprecated('This getter is temporary and will be removed shortly.')
614+
static List<SemanticsFlag> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
615+
616+
/// Temporary API until [values] return a list.
617+
/// https://github.com/flutter/flutter/issues/123346
618+
@Deprecated('This getter is temporary and will be removed shortly.')
619+
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
620+
601621
@override
602622
String toString() {
603623
switch (index) {

lib/web_ui/lib/semantics.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ class SemanticsAction {
8080
_kSetTextIndex: setText,
8181
};
8282

83+
/// Temporary API until [values] return a list.
84+
/// https://github.com/flutter/flutter/issues/123346
85+
@Deprecated('This getter is temporary and will be removed shortly.')
86+
static List<SemanticsAction> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
87+
88+
/// Temporary API until [values] return a list.
89+
/// https://github.com/flutter/flutter/issues/123346
90+
@Deprecated('This getter is temporary and will be removed shortly.')
91+
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
92+
8393
@override
8494
String toString() {
8595
switch (index) {
@@ -221,6 +231,16 @@ class SemanticsFlag {
221231
_kIsCheckStateMixedIndex: isCheckStateMixed,
222232
};
223233

234+
/// Temporary API until [values] return a list.
235+
/// https://github.com/flutter/flutter/issues/123346
236+
@Deprecated('This getter is temporary and will be removed shortly.')
237+
static List<SemanticsFlag> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
238+
239+
/// Temporary API until [values] return a list.
240+
/// https://github.com/flutter/flutter/issues/123346
241+
@Deprecated('This getter is temporary and will be removed shortly.')
242+
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
243+
224244
@override
225245
String toString() {
226246
switch (index) {

0 commit comments

Comments
 (0)