Add phone bottom navigation bar

Replace the narrow-layout floating destination pill with a full-width Material 3 NavigationBar. Reuse the shell destination model and badge wiring while preserving re-selection callbacks and hiding the bar for keyboard/detail states.
This commit is contained in:
2026-11-12 02:51:01 +00:00
parent 9bb87e5118
commit aabd22b5ad
12 changed files with 467 additions and 126 deletions
+19 -15
View File
@@ -175,23 +175,27 @@ void main() {
expect(body.left, greaterThan(list.right));
});
testWidgets('phone and narrow windows keep the floating bar and no rail', (
testWidgets('a phone shows the navigation bar with Settings and no rail', (
tester,
) async {
for (final width in [390.0, 640.0]) {
await pumpShell(tester, width: width);
expect(rail(), findsNothing, reason: '$width');
expect(
find.byKey(const ValueKey('shell.destination.settings')),
findsNothing,
reason: '$width',
);
expect(
find.byType(FloatingDestinationBar),
findsOneWidget,
reason: '$width',
);
}
await pumpShell(tester, width: 390);
expect(rail(), findsNothing);
expect(find.byType(NavigationBar), findsOneWidget);
expect(
find.byKey(const ValueKey('shell.destination.settings')),
findsOneWidget,
);
expect(find.byType(FloatingDestinationBar), findsNothing);
});
testWidgets('a narrow window below the rail keeps the floating bar, no rail '
'and no navigation bar', (tester) async {
// 640 is wide enough for the list beside its open item, which keeps the
// floating bar under the list column.
await pumpShell(tester, width: 640);
expect(rail(), findsNothing);
expect(find.byType(NavigationBar), findsNothing);
expect(find.byType(FloatingDestinationBar), findsOneWidget);
});
testWidgets('floating windows keep to the right of the rail on a wide '