forked from firka/flutter
Add multi-line flag to semantics (#36297)
This commit is contained in:
@@ -419,6 +419,7 @@ Matcher matchesSemantics({
|
||||
bool isInMutuallyExclusiveGroup = false,
|
||||
bool isHeader = false,
|
||||
bool isObscured = false,
|
||||
bool isMultiline = false,
|
||||
bool namesRoute = false,
|
||||
bool scopesRoute = false,
|
||||
bool isHidden = false,
|
||||
@@ -479,6 +480,8 @@ Matcher matchesSemantics({
|
||||
flags.add(SemanticsFlag.isHeader);
|
||||
if (isObscured)
|
||||
flags.add(SemanticsFlag.isObscured);
|
||||
if (isMultiline)
|
||||
flags.add(SemanticsFlag.isMultiline);
|
||||
if (namesRoute)
|
||||
flags.add(SemanticsFlag.namesRoute);
|
||||
if (scopesRoute)
|
||||
|
||||
@@ -560,7 +560,9 @@ void main() {
|
||||
for (int index in SemanticsAction.values.keys)
|
||||
actions |= index;
|
||||
for (int index in SemanticsFlag.values.keys)
|
||||
flags |= index;
|
||||
// TODO(mdebbar): Remove this if after https://github.com/flutter/engine/pull/9894
|
||||
if (SemanticsFlag.values[index] != SemanticsFlag.isMultiline)
|
||||
flags |= index;
|
||||
final SemanticsData data = SemanticsData(
|
||||
flags: flags,
|
||||
actions: actions,
|
||||
@@ -604,6 +606,8 @@ void main() {
|
||||
isInMutuallyExclusiveGroup: true,
|
||||
isHeader: true,
|
||||
isObscured: true,
|
||||
// TODO(mdebbar): Uncomment after https://github.com/flutter/engine/pull/9894
|
||||
//isMultiline: true,
|
||||
namesRoute: true,
|
||||
scopesRoute: true,
|
||||
isHidden: true,
|
||||
|
||||
Reference in New Issue
Block a user