Add header SemanticsFlag to bottom nav bar (#19803)
This commit is contained in:
parent
70791c3087
commit
f516074a98
@ -277,6 +277,7 @@ class _BottomNavigationTile extends StatelessWidget {
|
|||||||
flex: size,
|
flex: size,
|
||||||
child: new Semantics(
|
child: new Semantics(
|
||||||
container: true,
|
container: true,
|
||||||
|
header: true,
|
||||||
selected: selected,
|
selected: selected,
|
||||||
child: new Stack(
|
child: new Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
@ -574,19 +574,28 @@ void main() {
|
|||||||
children: <TestSemantics>[
|
children: <TestSemantics>[
|
||||||
new TestSemantics(
|
new TestSemantics(
|
||||||
id: 3,
|
id: 3,
|
||||||
flags: <SemanticsFlag>[SemanticsFlag.isSelected],
|
flags: <SemanticsFlag>[
|
||||||
|
SemanticsFlag.isSelected,
|
||||||
|
SemanticsFlag.isHeader,
|
||||||
|
],
|
||||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||||
label: 'AC\nTab 1 of 3',
|
label: 'AC\nTab 1 of 3',
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
),
|
),
|
||||||
new TestSemantics(
|
new TestSemantics(
|
||||||
id: 4,
|
id: 4,
|
||||||
|
flags: <SemanticsFlag>[
|
||||||
|
SemanticsFlag.isHeader,
|
||||||
|
],
|
||||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||||
label: 'Alarm\nTab 2 of 3',
|
label: 'Alarm\nTab 2 of 3',
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
),
|
),
|
||||||
new TestSemantics(
|
new TestSemantics(
|
||||||
id: 5,
|
id: 5,
|
||||||
|
flags: <SemanticsFlag>[
|
||||||
|
SemanticsFlag.isHeader,
|
||||||
|
],
|
||||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||||
label: 'Hot Tub\nTab 3 of 3',
|
label: 'Hot Tub\nTab 3 of 3',
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user