From 34003d8e06f5b69308627dcecdf6bcd421e1131a Mon Sep 17 00:00:00 2001 From: amirh Date: Fri, 20 Oct 2017 14:23:40 -0700 Subject: [PATCH] Add isButton to SemanticsFlags.values (flutter/engine#4258) --- engine/src/flutter/lib/ui/semantics.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/ui/semantics.dart b/engine/src/flutter/lib/ui/semantics.dart index 81d8962ed2..09d92cd0b2 100644 --- a/engine/src/flutter/lib/ui/semantics.dart +++ b/engine/src/flutter/lib/ui/semantics.dart @@ -123,7 +123,7 @@ class SemanticsFlags { static const int _kHasCheckedStateIndex = 1 << 0; static const int _kIsCheckedIndex = 1 << 1; static const int _kIsSelectedIndex = 1 << 2; - static const int _kIsButton = 1 << 3; + static const int _kIsButtonIndex = 1 << 3; const SemanticsFlags._(this.index); @@ -159,7 +159,7 @@ class SemanticsFlags { /// Platforms has special handling for buttons, for example Android's TalkBack /// and iOS's VoiceOver provides an additional hint when the focused object is /// a button. - static const SemanticsFlags isButton = const SemanticsFlags._(_kIsButton); + static const SemanticsFlags isButton = const SemanticsFlags._(_kIsButtonIndex); /// The possible semantics flags. /// @@ -168,6 +168,7 @@ class SemanticsFlags { _kHasCheckedStateIndex: hasCheckedState, _kIsCheckedIndex: isChecked, _kIsSelectedIndex: isSelected, + _kIsButtonIndex: isButton }; @override @@ -179,6 +180,8 @@ class SemanticsFlags { return 'SemanticsFlags.isChecked'; case _kIsSelectedIndex: return 'SemanticsFlags.isSelected'; + case _kIsButtonIndex: + return 'SemanticsFlags.isButton'; } return null; }