Preserve caption focus and scale readable chat controls

This commit is contained in:
2026-11-07 21:02:41 +00:00
parent 03ac760361
commit 1da3da92a3
7 changed files with 109 additions and 19 deletions
@@ -24,7 +24,8 @@ import 'floating_destination_labels.dart';
/// button pops in on its own, staggered, when the bar appears or its set of
/// tabs changes, never when only the selection does.
///
/// The buttons show icons only. Each tab's label stays its accessible name
/// Page tabs show icons only by default; [showLabels] gives main navigation
/// visible, scalable captions. Each tab's label stays its accessible name
/// (and the Material tooltip), announced as a selectable tab with "tab n of
/// m" the way the platform navigation controls announce theirs (see
/// [FloatingTabButton]); the icons must be distinct within a bar. The
@@ -56,22 +56,24 @@ class FloatingDestinationLabels extends StatelessWidget {
key: ValueKey('destination-label-${labels[index]}'),
excludeFromSemantics: true,
onTap: () => onTap(index),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
buttonBuilder(index),
ExcludeSemantics(
child: Text(
labels[index],
style: style.copyWith(
color: color,
fontWeight: index == selected
? FontWeight.w600
: style.fontWeight,
child: TextFieldTapRegion(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
buttonBuilder(index),
ExcludeSemantics(
child: Text(
labels[index],
style: style.copyWith(
color: color,
fontWeight: index == selected
? FontWeight.w600
: style.fontWeight,
),
),
),
),
],
],
),
),
),
],
@@ -6,7 +6,8 @@ import 'package:flutter/widgets.dart';
/// [child] fills the whole area and scrolls behind the bar; it learns the
/// bar's measured height (status-bar inset included) as its
/// [MediaQuery.paddingOf] top, so a list can pad its first item below the bar
/// at rest. Taps the bar does not take reach [child].
/// at rest. [reserveSpace] instead gives reading content its own clipped
/// viewport below the bar. Taps the bar does not take reach [child].
class SegmentedBarOverlay extends StatelessWidget {
const SegmentedBarOverlay({
super.key,