replace generic analysisboard header (#3189)

This commit is contained in:
Noah
2026-05-19 10:23:24 +02:00
committed by GitHub
parent d232eee1e7
commit df84205cb7
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -119,14 +119,19 @@ class _AnalysisScreenState extends ConsumerState<_AnalysisScreen>
switch (asyncState) {
case AsyncData(:final value):
Widget appBarTitle;
if (value.archivedGame != null) {
final title =
'${value.archivedGame!.data.clockDisplay(context.l10n)}${value.archivedGame!.meta.speed.label}${value.archivedGame!.meta.rated ? context.l10n.rated : context.l10n.casual}';
appBarTitle = VariantAppBarTitle(variant: value.variant, title: title);
} else {
appBarTitle = VariantAppBarTitle(variant: value.variant, title: context.l10n.analysis);
}
return WakelockWidget(
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
centerTitle: false,
title: VariantAppBarTitle(variant: value.variant, title: context.l10n.analysis),
actions: appBarActions,
),
appBar: AppBar(centerTitle: false, title: appBarTitle, actions: appBarActions),
body: _Body(options: widget.options, controller: _tabController, tabs: tabs),
),
);
+1 -1
View File
@@ -1484,7 +1484,7 @@ void main() {
await tester.tap(find.text('Analysis board'));
await tester.pumpAndSettle(); // wait for analysis screen to open
expect(
find.widgetWithText(AppBar, 'Analysis board'),
find.descendant(of: find.byType(AppBar), matching: find.textContaining('Rated')),
findsOneWidget,
); // analysis screen is now open
expect(find.byType(Chessboard), findsOneWidget);