Align wide desktop tabs to leading edge

This commit is contained in:
2026-11-07 22:14:42 +00:00
parent 6a3daccd6d
commit 4e2b9800e8
5 changed files with 45 additions and 41 deletions
@@ -13,10 +13,11 @@ import 'floating_destination_labels.dart';
/// frosted [GlassPill] buttons, one per tab, instead of a full-width system
/// bar. Used for the app's destinations and for every page's own tabs.
///
/// The row is only as wide as its buttons and sits at the trailing (right,
/// in left-to-right text) edge, near the thumb, keeping [kFloatingBarMargin]
/// from the sides and above the bottom safe area. Only the buttons take
/// taps: the gaps between and beside them reach the content behind. A row
/// The row is only as wide as its buttons and, by default, sits at the trailing
/// (right, in left-to-right text) edge, near the thumb, keeping
/// [kFloatingBarMargin] from the sides and above the bottom safe area. Hosts
/// can request another alignment for a pane-specific layout. Only the buttons
/// take taps: the gaps between and beside them reach the content behind. A row
/// squeezed below its natural width narrows its gaps, then scales down.
///
/// The selected button is filled with the host's selection tint, which
@@ -48,8 +49,8 @@ class FloatingDestinationBar extends StatefulWidget {
final bool showLabels;
/// Where the row sits in the width it is given, at [FloatingBarEdge.bottom]:
/// the trailing end by default. The shell centres its tabs under the list
/// pane while a list shows beside an open item.
/// the trailing end by default. The shell can align its main tabs to the
/// leading edge of a list pane while a list shows beside an open item.
final AlignmentGeometry? alignment;
/// The edge the bar floats at. At [FloatingBarEdge.top] (an open item's