feat(app): icon-only tab bars, Settings from the Pipelines bar, main bar bottom right with detail bars above it
Settings leaves the tab bar (Pipelines, Runs, Chat, Search) and opens as a page from a gear in the Pipelines bar, keeping /settings, its keys and a Back to Pipelines (also the system Back). Every floating tab bar shows icons only, named for assistive technology. On wide windows the shell's tab bar stays at the bottom right; a split detail learns its height plus a 12px gap, so its tabs or the chat composer float above it, and pages the detail opens (the stage page) stay in its pane through its own navigator.
This commit is contained in:
@@ -92,13 +92,13 @@ void main() {
|
||||
|
||||
testWidgets('the badge stays visible from every destination', (tester) async {
|
||||
await pumpShell(tester, width: 1000, cupertino: false, count: 2);
|
||||
for (final label in ['Runs', 'Chat', 'Settings']) {
|
||||
await tester.tap(find.text(label).last);
|
||||
for (final name in ['runs', 'chat', 'search']) {
|
||||
await tester.tap(find.byKey(ValueKey('shell.destination.$name')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
find.descendant(of: find.byType(Badge), matching: find.text('2')),
|
||||
findsOneWidget,
|
||||
reason: 'badge missing on $label',
|
||||
reason: 'badge missing on $name',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -14,11 +14,6 @@ void main() {
|
||||
matching: find.byType(GlassPill),
|
||||
);
|
||||
|
||||
Finder barText(String label) => find.descendant(
|
||||
of: find.byType(FloatingDestinationBar),
|
||||
matching: find.text(label),
|
||||
);
|
||||
|
||||
Future<void> setSize(WidgetTester tester, Size size) async {
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1;
|
||||
@@ -74,7 +69,14 @@ void main() {
|
||||
expect(rect.right, 1200 - 16);
|
||||
expect(rect.bottom, 800 - 16);
|
||||
expect(rect.width, lessThan(1200 * 0.6));
|
||||
expect(rect.width, greaterThan(5 * 72));
|
||||
// Four icon-only tabs (Settings opens from the Pipelines bar).
|
||||
expect(
|
||||
rect.width,
|
||||
4 *
|
||||
(cupertino
|
||||
? FloatingDestinationBar.cupertinoTabWidth
|
||||
: FloatingDestinationBar.materialTabWidth),
|
||||
);
|
||||
// No rail or sidebar: the content starts at the left edge.
|
||||
expect(find.byType(NavigationRail), findsNothing);
|
||||
expect(find.byType(CupertinoListTile), findsNothing);
|
||||
@@ -143,12 +145,16 @@ void main() {
|
||||
await tester.pumpWidget(shell(cupertino: cupertino));
|
||||
await tester.tap(find.byKey(const ValueKey('shell.destination.runs')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
tester.getSemantics(barText('Runs')),
|
||||
isSemantics(isSelected: true),
|
||||
final runs = tester.getSemantics(
|
||||
find.byKey(const ValueKey('shell.destination.runs')),
|
||||
);
|
||||
expect(runs, isSemantics(isSelected: true));
|
||||
// Icon-only, yet the tab keeps its name for assistive technology.
|
||||
expect(runs.label, startsWith('Runs'));
|
||||
expect(
|
||||
tester.getSemantics(barText('Chat')),
|
||||
tester.getSemantics(
|
||||
find.byKey(const ValueKey('shell.destination.chat')),
|
||||
),
|
||||
isNot(isSemantics(isSelected: true)),
|
||||
);
|
||||
semantics.dispose();
|
||||
|
||||
@@ -151,7 +151,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('$host 1200: the item\'s tabs float at the bottom of its '
|
||||
'pane, beside the shell\'s tab bar', (tester) async {
|
||||
'pane, above the shell\'s tab bar', (tester) async {
|
||||
await setSize(tester, const Size(1200, 800));
|
||||
await tester.pumpWidget(shell(cupertino: cupertino));
|
||||
await tester.pump();
|
||||
@@ -174,8 +174,11 @@ void main() {
|
||||
final body = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
// Near the bottom of the detail pane, never on the shell's tabs.
|
||||
expect(itemTabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
// The shell's tabs keep the bottom right; the item's float a gap
|
||||
// above them in the detail pane, never on them.
|
||||
expect(shellTabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
expect(shellTabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(itemTabs.bottom, closeTo(shellTabs.top - kStackedBarGap, 0.5));
|
||||
expect(itemTabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(itemTabs.overlaps(shellTabs), isFalse);
|
||||
// The item's list starts below its bar and clears its tabs at rest.
|
||||
|
||||
@@ -52,13 +52,28 @@ void main() {
|
||||
expect(find.byKey(const Key('run-more')), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('$host: Search is the fifth tab', (tester) async {
|
||||
testWidgets('$host: Search is the fourth tab; Settings is not a tab', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
await tester.pumpWidget(_app(cupertino: cupertino, open: false));
|
||||
expect(AppDestination.values, hasLength(5));
|
||||
expect(find.text('Search'), findsOneWidget);
|
||||
expect(shellTabDestinations, [
|
||||
AppDestination.pipelines,
|
||||
AppDestination.runs,
|
||||
AppDestination.chat,
|
||||
AppDestination.search,
|
||||
]);
|
||||
expect(
|
||||
find.byKey(const ValueKey('shell.destination.search')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
find.byKey(const ValueKey('shell.destination.settings')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(find.byKey(const ValueKey('shell.search')), findsNothing);
|
||||
expect(find.byType(FloatingDestinationBar), findsOneWidget);
|
||||
});
|
||||
@@ -76,7 +91,7 @@ void main() {
|
||||
matching: find.byType(GlassPill),
|
||||
);
|
||||
expect(tester.getSize(destinationPill).width, 358);
|
||||
await tester.tap(find.text('Chat'));
|
||||
await tester.tap(find.byKey(const ValueKey('shell.destination.chat')));
|
||||
await tester.pump();
|
||||
expect(find.text('Chat — Not implemented'), findsOneWidget);
|
||||
});
|
||||
|
||||
@@ -5,11 +5,13 @@ import 'package:pipelines_app/shell/adaptive_shell.dart';
|
||||
import 'package:pipelines_app/shell/destination.dart';
|
||||
import 'package:pipelines_app/shell/list_detail.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/floating_bar_layout.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
|
||||
|
||||
/// While a tab shows its list beside an open item, the shell's destination
|
||||
/// bar floats over the list pane only: it never covers the item, and the
|
||||
/// item's own bottom control (a composer) owns the pane's bottom edge.
|
||||
/// bar keeps its place at the bottom right (near the thumb). The item's own
|
||||
/// bottom control (its tabs, or a composer) floats above it with a gap, and
|
||||
/// the item's content clears both.
|
||||
void main() {
|
||||
Future<void> setSize(WidgetTester tester, Size size) async {
|
||||
tester.view.physicalSize = size;
|
||||
@@ -43,9 +45,36 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
/// A detail with its own floating tabs over a list, like run detail.
|
||||
Widget tabsDetail(bool cupertino) => FloatingBarOverlay(
|
||||
bar: KeyedSubtree(
|
||||
key: const Key('detail-tabs'),
|
||||
child: FloatingDestinationBar(
|
||||
cupertino: cupertino,
|
||||
currentIndex: 0,
|
||||
onTap: (_) {},
|
||||
items: const [
|
||||
FloatingDestinationItem(icon: Icon(Icons.summarize), label: 'One'),
|
||||
FloatingDestinationItem(icon: Icon(Icons.timeline), label: 'Two'),
|
||||
FloatingDestinationItem(icon: Icon(Icons.inventory), label: 'Three'),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Builder(
|
||||
builder: (context) => ListView(
|
||||
key: const Key('detail-list'),
|
||||
children: [
|
||||
for (var index = 0; index < 40; index++)
|
||||
SizedBox(height: 40, child: Text('item $index')),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Widget shell({
|
||||
required bool cupertino,
|
||||
bool split = true,
|
||||
bool tabs = false,
|
||||
double textScale = 1,
|
||||
}) {
|
||||
final app = AdaptiveShell(
|
||||
@@ -53,7 +82,10 @@ void main() {
|
||||
destination: AppDestination.chat,
|
||||
destinationBodies: {
|
||||
AppDestination.chat: (_) => split
|
||||
? ListDetailPanes(list: listBody(), detail: composerDetail())
|
||||
? ListDetailPanes(
|
||||
list: listBody(),
|
||||
detail: tabs ? tabsDetail(cupertino) : composerDetail(),
|
||||
)
|
||||
: listBody(),
|
||||
},
|
||||
);
|
||||
@@ -78,8 +110,8 @@ void main() {
|
||||
final host = cupertino ? 'Cupertino' : 'Material';
|
||||
|
||||
for (final width in [1200.0, 1600.0]) {
|
||||
testWidgets('$host $width split: the destination bar stays over the '
|
||||
'list pane and the composer owns the detail bottom', (tester) async {
|
||||
testWidgets('$host $width split: the destination bar stays bottom '
|
||||
'right and the composer floats above it', (tester) async {
|
||||
await setSize(tester, Size(width, 800));
|
||||
await tester.pumpWidget(shell(cupertino: cupertino));
|
||||
await tester.pump();
|
||||
@@ -92,23 +124,59 @@ void main() {
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
final pill = destinationPill(tester);
|
||||
expect(pill.right, lessThanOrEqualTo(list.right));
|
||||
expect(pill.left, greaterThanOrEqualTo(list.left));
|
||||
expect(pill.overlaps(body), isFalse, reason: 'no overlap with detail');
|
||||
// Compact at the window's right edge, over the detail pane only.
|
||||
expect(pill.right, closeTo(width - kFloatingBarMargin, 0.5));
|
||||
expect(pill.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
expect(pill.width, lessThan(body.width / 2));
|
||||
expect(pill.overlaps(list), isFalse, reason: 'never over the list');
|
||||
expect(pill.left, greaterThan(body.left));
|
||||
|
||||
// The detail keeps only the system inset (none here): its composer
|
||||
// reaches the bottom edge, below the level of the shell's pill.
|
||||
// The composer's box starts a gap above the shell's pill (the real
|
||||
// composer pads its pill by another 12 inside that box).
|
||||
final composer = tester.getRect(find.byKey(const Key('composer')));
|
||||
expect(composer.bottom, 800);
|
||||
expect(composer.left, body.left);
|
||||
expect(composer.top, greaterThan(pill.top));
|
||||
expect(composer.overlaps(pill), isFalse);
|
||||
expect(pill.top - composer.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
|
||||
// The list still clears the bar.
|
||||
// The list is not under the bar: it clears only the system inset.
|
||||
final listContext = tester.element(find.byKey(const Key('list')));
|
||||
expect(MediaQuery.paddingOf(listContext).bottom, 0);
|
||||
});
|
||||
|
||||
testWidgets('$host $width split: the item tabs float above the '
|
||||
'destination bar with a gap, and its content clears both', (
|
||||
tester,
|
||||
) async {
|
||||
await setSize(tester, Size(width, 800));
|
||||
await tester.pumpWidget(shell(cupertino: cupertino, tabs: true));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
|
||||
final body = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
final pill = destinationPill(tester);
|
||||
final tabs = tester.getRect(
|
||||
find
|
||||
.descendant(
|
||||
of: find.byKey(const Key('detail-tabs')),
|
||||
matching: find.byType(GlassPill),
|
||||
)
|
||||
.first,
|
||||
);
|
||||
expect(pill.right, closeTo(width - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.right, closeTo(width - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.left, greaterThan(body.left));
|
||||
expect(tabs.overlaps(pill), isFalse);
|
||||
expect(pill.top - tabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
|
||||
// The item's list pads its end clear of both pills.
|
||||
final listContext = tester.element(
|
||||
find.byKey(const Key('detail-list')),
|
||||
);
|
||||
expect(
|
||||
MediaQuery.paddingOf(listContext).bottom,
|
||||
greaterThanOrEqualTo(pill.height),
|
||||
closeTo(800 - tabs.top, 0.5),
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -134,17 +202,21 @@ void main() {
|
||||
});
|
||||
|
||||
for (final width in [600.0, 840.0]) {
|
||||
testWidgets('$host $width split at 2x: the narrow list pane bar lays '
|
||||
'out without overflow', (tester) async {
|
||||
testWidgets('$host $width split at 2x: both bars lay out over the '
|
||||
'detail pane without overflow', (tester) async {
|
||||
await setSize(tester, Size(width, 800));
|
||||
await tester.pumpWidget(shell(cupertino: cupertino, textScale: 2));
|
||||
await tester.pumpWidget(
|
||||
shell(cupertino: cupertino, tabs: true, textScale: 2),
|
||||
);
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(tester.takeException(), isNull);
|
||||
final list = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-list')),
|
||||
final body = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
expect(destinationPill(tester).right, lessThanOrEqualTo(list.right));
|
||||
final pill = destinationPill(tester);
|
||||
expect(pill.left, greaterThanOrEqualTo(body.left));
|
||||
expect(pill.right, closeTo(width - kFloatingBarMargin, 0.5));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/runs/data/runs_repository.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_detail_tab.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/runs_controller.dart';
|
||||
import 'package:pipelines_app/shell/adaptive_shell.dart';
|
||||
import 'package:pipelines_app/shell/destination.dart';
|
||||
import 'package:pipelines_app/shell/detail_page.dart';
|
||||
import 'package:pipelines_app/shell/list_detail.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/floating_bar_layout.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/glass_pill.dart';
|
||||
|
||||
import '../features/runs/ui/run_detail_graph_support.dart';
|
||||
import '../features/runs/ui/run_detail_visit_support.dart';
|
||||
|
||||
/// On a wide split window (unfolded foldable, desktop) the real run detail
|
||||
/// and the stage page it opens keep the shell's tab bar at the bottom right
|
||||
/// and float their own tabs above it with a gap; the stage page opens inside
|
||||
/// the detail pane instead of covering the shell.
|
||||
void main() {
|
||||
Rect pillOf(WidgetTester tester, Finder owner) => tester.getRect(
|
||||
find.descendant(of: owner, matching: find.byType(GlassPill)).first,
|
||||
);
|
||||
|
||||
Rect shellPill(WidgetTester tester) => tester.getRect(
|
||||
find
|
||||
.ancestor(
|
||||
of: find.byKey(const ValueKey('shell.destination.runs')).first,
|
||||
matching: find.byType(GlassPill),
|
||||
)
|
||||
.first,
|
||||
);
|
||||
|
||||
Future<void> pumpSplitRun(WidgetTester tester, bool cupertino) async {
|
||||
tester.view.physicalSize = const Size(1200, 800);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
final gateway = RunDetailFakeGateway(visitRunFixture());
|
||||
final controller = RunsController(RunsRepository(gateway));
|
||||
addTearDown(controller.dispose);
|
||||
await controller.select(77);
|
||||
final shell = AdaptiveShell(
|
||||
cupertino: cupertino,
|
||||
destination: AppDestination.runs,
|
||||
destinationBodies: {
|
||||
AppDestination.runs: (_) => ListDetailPanes(
|
||||
list: ListView(
|
||||
children: [for (var i = 0; i < 30; i++) Text('run row $i')],
|
||||
),
|
||||
detail: DetailPane(
|
||||
destination: AppDestination.runs,
|
||||
implyBack: false,
|
||||
builder: (_) => RunDetailView(
|
||||
controller: controller,
|
||||
gateway: gateway,
|
||||
onBack: () {},
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
);
|
||||
await tester.pumpWidget(
|
||||
cupertino
|
||||
? CupertinoApp(home: shell)
|
||||
: MaterialApp(
|
||||
theme: ThemeData(platform: TargetPlatform.android),
|
||||
home: shell,
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
for (final cupertino in [false, true]) {
|
||||
final host = cupertino ? 'Cupertino' : 'Material';
|
||||
|
||||
testWidgets('$host 1200: run tabs float above the shell bar, and the '
|
||||
'stage page opens in the pane with its tabs above it too', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpSplitRun(tester, cupertino);
|
||||
final body = tester.getRect(
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
var main = shellPill(tester);
|
||||
expect(main.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(main.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
|
||||
final runTabs = pillOf(tester, find.byKey(const Key('run-detail-tabs')));
|
||||
expect(runTabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(runTabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(runTabs.overlaps(main), isFalse);
|
||||
expect(main.top - runTabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
|
||||
// Open the stage page from the timeline.
|
||||
await openRunDetailTab(tester, RunDetailTab.timeline);
|
||||
final row = find.byKey(const ValueKey('run-timeline-visit-1'));
|
||||
await tester.ensureVisible(row);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(row);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('run-visit-back')), findsOneWidget);
|
||||
// The page covers only the detail pane: the root navigator has nothing
|
||||
// pushed, and the list and the shell's tab bar stay in place.
|
||||
expect(
|
||||
tester.state<NavigatorState>(find.byType(Navigator).first).canPop(),
|
||||
isFalse,
|
||||
);
|
||||
expect(find.text('run row 0'), findsOneWidget);
|
||||
final back = tester.getRect(find.byKey(const Key('run-visit-back')));
|
||||
expect(back.left, greaterThanOrEqualTo(body.left));
|
||||
main = shellPill(tester);
|
||||
expect(main.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
final visitTabs = pillOf(
|
||||
tester,
|
||||
find.byKey(const Key('run-visit-tabs')).last,
|
||||
);
|
||||
expect(visitTabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(visitTabs.overlaps(main), isFalse);
|
||||
expect(main.top - visitTabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
// The shell's tabs still work over the open stage page.
|
||||
await tester.tap(find.byKey(const ValueKey('shell.destination.runs')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Back closes the page inside the pane, back to the run.
|
||||
await tester.tap(find.byKey(const Key('run-visit-back')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const Key('run-visit-back')), findsNothing);
|
||||
expect(find.byKey(const Key('run-detail-tabs')), findsOneWidget);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -15,15 +15,19 @@ import 'package:pipelines_app/ui/adaptive/segmented_bar_overlay.dart';
|
||||
/// On a wide split window (an unfolded foldable) under a system status bar,
|
||||
/// every pane's bar sits below the status-bar inset while content still
|
||||
/// reaches the top edge; and the open item's tabs float at the bottom of the
|
||||
/// detail pane, beside (never on) the shell's tab bar over the list.
|
||||
/// detail pane, above (never on) the shell's tab bar at the bottom right.
|
||||
void main() {
|
||||
const statusBar = 40.0;
|
||||
|
||||
Future<void> setUp(WidgetTester tester, Size size) async {
|
||||
Future<void> setUp(
|
||||
WidgetTester tester,
|
||||
Size size, {
|
||||
double bottom = 0,
|
||||
}) async {
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1;
|
||||
tester.view.padding = const FakeViewPadding(top: statusBar);
|
||||
tester.view.viewPadding = const FakeViewPadding(top: statusBar);
|
||||
tester.view.padding = FakeViewPadding(top: statusBar, bottom: bottom);
|
||||
tester.view.viewPadding = FakeViewPadding(top: statusBar, bottom: bottom);
|
||||
addTearDown(tester.view.reset);
|
||||
}
|
||||
|
||||
@@ -156,9 +160,10 @@ void main() {
|
||||
expect(tester.getTopLeft(find.byKey(const Key('item-list'))).dy, 0);
|
||||
});
|
||||
|
||||
testWidgets('$host split: the item tabs float at the bottom of the '
|
||||
'detail pane, beside the shell tab bar over the list', (tester) async {
|
||||
await setUp(tester, const Size(1200, 800));
|
||||
testWidgets('$host split: the item tabs float above the shell tab bar '
|
||||
'at the bottom right of the detail pane', (tester) async {
|
||||
// A gesture-navigation inset as on the unfolded foldable.
|
||||
await setUp(tester, const Size(1200, 800), bottom: 24);
|
||||
await tester.pumpWidget(shell(cupertino, tabbedItem));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
@@ -167,7 +172,6 @@ void main() {
|
||||
find.byKey(const ValueKey('list-detail-body')),
|
||||
);
|
||||
final tabs = pillsOf(tester, find.byKey(const Key('item-tabs'))).single;
|
||||
expect(tabs.bottom, closeTo(800 - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.left, greaterThanOrEqualTo(body.left));
|
||||
expect(tabs.right, lessThanOrEqualTo(body.right));
|
||||
final shellTabs = tester.getRect(
|
||||
@@ -178,8 +182,13 @@ void main() {
|
||||
)
|
||||
.first,
|
||||
);
|
||||
// The shell's bar keeps the bottom right, above the system inset; the
|
||||
// item's tabs sit a gap above it, both at the trailing edge.
|
||||
expect(shellTabs.bottom, closeTo(800 - 24, 0.5));
|
||||
expect(shellTabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(tabs.right, closeTo(1200 - kFloatingBarMargin, 0.5));
|
||||
expect(shellTabs.overlaps(tabs), isFalse);
|
||||
expect(shellTabs.right, lessThanOrEqualTo(body.left));
|
||||
expect(shellTabs.top - tabs.bottom, closeTo(kStackedBarGap, 0.5));
|
||||
// The item's list clears its tabs at rest.
|
||||
final list = tester.element(find.byKey(const Key('item-list')));
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user