Shell: Settings has no list column, so its tab bar stays at the right edge

This commit is contained in:
2026-11-03 17:34:42 +00:00
parent fb3987ef4e
commit 43d6135df3
2 changed files with 18 additions and 3 deletions
+14 -1
View File
@@ -77,12 +77,14 @@ void main() {
bool tabs = false,
double textScale = 1,
ListPaneWidthStore? store,
AppDestination destination = AppDestination.chat,
}) {
final app = AdaptiveShell(
cupertino: cupertino,
listPaneWidthStore: store ?? MemoryListPaneWidthStore(),
destination: AppDestination.chat,
destination: destination,
destinationBodies: {
AppDestination.settings: (_) => const SizedBox.expand(),
AppDestination.chat: (_) => split
? ListDetailPanes(
list: listBody(),
@@ -211,6 +213,17 @@ void main() {
expect(pill.right, lessThanOrEqualTo(list.right - kFloatingBarMargin));
});
testWidgets('$host 1200 Settings: a page without a list keeps the bar '
'at the right edge', (tester) async {
await setSize(tester, const Size(1200, 800));
await tester.pumpWidget(
shell(cupertino: cupertino, destination: AppDestination.settings),
);
await tester.pump();
final pill = destinationPill(tester);
expect(pill.right, closeTo(1200 - kFloatingBarMargin, 0.5));
});
testWidgets('$host 1200 unsplit: the bar stays under the list column', (
tester,
) async {