Add header SemanticsFlag to bottom nav bar (#19803)

This commit is contained in:
Jonah Williams 2018-07-26 13:29:28 -07:00 committed by GitHub
parent 70791c3087
commit f516074a98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -277,6 +277,7 @@ class _BottomNavigationTile extends StatelessWidget {
flex: size,
child: new Semantics(
container: true,
header: true,
selected: selected,
child: new Stack(
children: <Widget>[

View File

@ -574,19 +574,28 @@ void main() {
children: <TestSemantics>[
new TestSemantics(
id: 3,
flags: <SemanticsFlag>[SemanticsFlag.isSelected],
flags: <SemanticsFlag>[
SemanticsFlag.isSelected,
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap],
label: 'AC\nTab 1 of 3',
textDirection: TextDirection.ltr,
),
new TestSemantics(
id: 4,
flags: <SemanticsFlag>[
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap],
label: 'Alarm\nTab 2 of 3',
textDirection: TextDirection.ltr,
),
new TestSemantics(
id: 5,
flags: <SemanticsFlag>[
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap],
label: 'Hot Tub\nTab 3 of 3',
textDirection: TextDirection.ltr,