Shell: on wide split layouts the destination tabs sit under the list pane

The four destination buttons move from the bottom right over the detail
pane to the bottom of the list pane, centred in the (dragged) list width.
The list now keeps the bar's height as bottom clearance; the detail pane
clears only the system inset, so its tabs, the chat composer and the
artifact actions sit at its bottom edge. Phone layout is unchanged.
kStackedBarGap is gone with the stacked bars.
This commit is contained in:
2026-11-03 12:30:56 +00:00
parent d34185b56c
commit 40e94cc3da
11 changed files with 191 additions and 90 deletions
+25 -16
View File
@@ -152,25 +152,34 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
// Only the bar shows the registry's state, so a published bar or badge
// rebuilds its bar alone; the destinations and scaffold stay as built.
_bar.focus = _selected;
// One floating glass tab bar at every width: full width on a phone,
// sized to its tabs at the right edge on a wide window (the bar judges
// that itself, live). Content keeps the whole width and scrolls behind
// it, learning the bar's height as its bottom media padding. Neither
// scaffold's structure depends on the width, so resizing never
// One floating glass tab bar at every width: sized to its tabs at the
// right edge, near the thumb. Content keeps the whole width and scrolls
// behind it, learning the bar's height as its bottom media padding.
// Neither scaffold's structure depends on the width, so resizing never
// remounts a destination.
//
// While the tab shows its list beside an open item the bar keeps
// the same place, bottom right near the thumb: the item pane learns
// the bar's height (see ListDetailPanes) and floats its own tabs or
// composer above it, so the two never overlap.
// While the tab shows its list beside an open item the bar moves under
// the list pane, centred in the list's (dragged) width, so the open item
// keeps its whole height: the list clears the bar and the item clears
// only the system inset (see ListDetailPanes). The bar keeps its place
// in the tree, so a split never replays its entrance.
final bar = ListenableBuilder(
listenable: _bar.badges,
builder: (context, _) => FloatingDestinationBar(
cupertino: widget.cupertino,
currentIndex: index,
onTap: (value) => _select(shellTabDestinations[value]),
items: _destinationItems(),
),
listenable: Listenable.merge([_bar.badges, _bar.bar, _paneWidths]),
builder: (context, _) {
final split = _bar.split(_selected);
return ListPaneWidth(
split: split,
preferredWidth: _paneWidths.widthFor(_selected.name),
alignment: AlignmentDirectional.bottomStart,
child: FloatingDestinationBar(
cupertino: widget.cupertino,
currentIndex: index,
onTap: (value) => _select(shellTabDestinations[value]),
items: _destinationItems(),
alignment: split ? Alignment.bottomCenter : null,
),
);
},
);
// Destinations reach the top edge and scroll behind the floating top
// bar too: each learns the bar's height as its top media padding and