Compact floating tab bars with circular selection and equal edge gaps

The floating tab bar is now sized to its icon tabs at the bottom right on
every width, the selected icon sits in a tinted circle on both hosts, and
the gap from each outer circle to the pill's sides equals the gap to its
top, bottom and neighbours.
This commit is contained in:
2026-10-31 16:53:24 +00:00
parent 4235cd858f
commit 44ea45150f
9 changed files with 430 additions and 78 deletions
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/pipelines/widgets/pipeline_tabs.dart';
import 'package:pipelines_app/features/pipelines/widgets/pipeline_detail_styles.dart';
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
void main() {
@@ -66,14 +67,15 @@ void main() {
findsOneWidget,
);
final pill = tester.getRect(find.byType(GlassPill));
if (width < 600) {
expect(pill.left, 16);
expect(pill.right, width - 16);
} else {
// Sized to its three tabs at the right edge.
expect(pill.right, width - 16);
expect(pill.width, lessThan(width * 0.6));
}
// Sized to its three tabs at the right edge, on a phone as when wide.
expect(pill.right, width - 16);
expect(
pill.width,
FloatingDestinationBar.pillWidth(
cupertino: cupertino,
tabs: PipelineDetailTab.values.length,
),
);
for (final tab in PipelineDetailTab.values) {
final rect = tester.getRect(
find.byKey(ValueKey('pipeline-detail-tab-${tab.name}')),