SemanticsFlag/SemanticsAction enum migration (part 1) (flutter/engine#40571)

`SemanticsFlag`/`SemanticsAction` enum migration (part 1)
This commit is contained in:
Bernardo Ferrari
2023-03-30 15:32:38 -03:00
committed by GitHub
parent 3c6508d73e
commit 60663bccf0
2 changed files with 40 additions and 0 deletions

View File

@@ -228,6 +228,16 @@ class SemanticsAction {
_kSetTextIndex: setText,
};
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static List<SemanticsAction> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
@override
String toString() {
switch (index) {
@@ -598,6 +608,16 @@ class SemanticsFlag {
_kIsCheckStateMixedIndex: isCheckStateMixed,
};
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static List<SemanticsFlag> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
@override
String toString() {
switch (index) {

View File

@@ -80,6 +80,16 @@ class SemanticsAction {
_kSetTextIndex: setText,
};
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static List<SemanticsAction> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
@override
String toString() {
switch (index) {
@@ -221,6 +231,16 @@ class SemanticsFlag {
_kIsCheckStateMixedIndex: isCheckStateMixed,
};
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static List<SemanticsFlag> get doNotUseWillBeDeletedWithoutWarningValuesAsList => values.values.toList(growable: false);
/// Temporary API until [values] return a list.
/// https://github.com/flutter/flutter/issues/123346
@Deprecated('This getter is temporary and will be removed shortly.')
static Iterable<int> get doNotUseWillBeDeletedWithoutWarningKeys => values.keys;
@override
String toString() {
switch (index) {