Missing link flag (flutter/engine#13001)
This commit is contained in:
@@ -294,6 +294,7 @@ class SemanticsFlag {
|
||||
static const int _kIsMultilineIndex = 1 << 19;
|
||||
static const int _kIsReadOnlyIndex = 1 << 20;
|
||||
static const int _kIsFocusableIndex = 1 << 21;
|
||||
static const int _kIsLinkIndex = 1 << 22;
|
||||
|
||||
const SemanticsFlag._(this.index);
|
||||
|
||||
@@ -341,6 +342,12 @@ class SemanticsFlag {
|
||||
/// a button.
|
||||
static const SemanticsFlag isButton = SemanticsFlag._(_kIsButtonIndex);
|
||||
|
||||
/// Whether the semantic node represents a link.
|
||||
///
|
||||
/// Platforms have special handling for links, for example, iOS's VoiceOver
|
||||
/// provides an additional hint when the focused object is a link.
|
||||
static const SemanticsFlag isLink = SemanticsFlag._(_kIsButtonIndex);
|
||||
|
||||
/// Whether the semantic node represents a text field.
|
||||
///
|
||||
/// Text fields are announced as such and allow text input via accessibility
|
||||
@@ -522,6 +529,7 @@ class SemanticsFlag {
|
||||
_kIsCheckedIndex: isChecked,
|
||||
_kIsSelectedIndex: isSelected,
|
||||
_kIsButtonIndex: isButton,
|
||||
_kIsLinkIndex: isLink,
|
||||
_kIsTextFieldIndex: isTextField,
|
||||
_kIsFocusableIndex: isFocusable,
|
||||
_kIsFocusedIndex: isFocused,
|
||||
@@ -553,6 +561,8 @@ class SemanticsFlag {
|
||||
return 'SemanticsFlag.isSelected';
|
||||
case _kIsButtonIndex:
|
||||
return 'SemanticsFlag.isButton';
|
||||
case _kIsLinkIndex:
|
||||
return 'SemanticsFlag.isLink';
|
||||
case _kIsTextFieldIndex:
|
||||
return 'SemanticsFlag.isTextField';
|
||||
case _kIsFocusableIndex:
|
||||
|
||||
Reference in New Issue
Block a user