Files
pipelines/app/lib/features/runs/ui/run_detail_material.dart
T
alan 9551eceaed Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
2026-11-11 21:55:39 +00:00

75 lines
2.2 KiB
Dart

import 'package:flutter/material.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/status/run_status_icon.dart';
import '../domain/run_models.dart';
import 'run_detail_tabs.dart';
/// The runs detail with standard Material controls.
///
/// The top bar carries the run's identity (title, number, pipeline and
/// version), Back and the more menu; this header keeps only what the bar does
/// not: the status in its colour beside the run actions, and the notices.
/// The shared tab body supplies Summary, Timeline, Artifacts and Changes.
Widget buildMaterialRunDetail({
required BuildContext context,
required JsonMap run,
required Widget headerActions,
required bool detailLoading,
required String? error,
required bool copying,
required String? copyStatus,
required VoidCallback onCopy,
required ApiGateway gateway,
required ValueChanged<JsonMap> onRunChanged,
required String configuredEndpoint,
String? initialStageKey,
int? initialVisit,
}) {
return RunDetailTabs(
run: run,
copying: copying,
copyStatus: copyStatus,
onCopy: onCopy,
gateway: gateway,
onRunChanged: onRunChanged,
configuredEndpoint: configuredEndpoint,
initialStageKey: initialStageKey,
initialVisit: initialVisit,
// A glass strip under the top bar: as wide as its content.
header: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(12, 4, 12, 4),
child: Wrap(
spacing: 12,
runSpacing: 4,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
RunStatusKicker(
state: runStateOf(run['status']),
label: runStatusLabel(run),
),
headerActions,
],
),
),
if (detailLoading) const _Notice('Refreshing run details…'),
if (error != null) _Notice(error),
],
),
);
}
class _Notice extends StatelessWidget {
const _Notice(this.text);
final String text;
@override
Widget build(BuildContext context) => Padding(
padding: const EdgeInsets.fromLTRB(12, 0, 12, 8),
child: Semantics(liveRegion: true, child: Text(text)),
);
}