Lay out phone content above navigation bar

Use the phone NavigationBar as a real Scaffold bottom slot so destination content ends at the bar rather than scrolling beneath it. Update shell regression coverage and document the focused verification.
This commit is contained in:
2026-11-12 19:25:39 +00:00
parent 767643d991
commit 08b2540ec2
4 changed files with 63 additions and 24 deletions
@@ -70,6 +70,24 @@ void main() {
expect(tester.widget<NavigationBar>(bar()).selectedIndex, 4);
});
testWidgets('the phone destination body ends at the bar top', (tester) async {
await pumpPhone(
tester,
bodies: {
AppDestination.pipelines: (_) => const ColoredBox(
key: ValueKey('phone.destination-body'),
color: Colors.red,
),
},
);
final body = tester.getRect(
find.byKey(const ValueKey('phone.destination-body')),
);
final navigationBar = tester.getRect(bar());
expect(body.bottom, navigationBar.top);
});
testWidgets('a tap shows its destination, and a re-tap of the shown one '
'still reports it to the shell', (tester) async {
final selected = <AppDestination>[];