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:
@@ -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>[];
|
||||
|
||||
Reference in New Issue
Block a user