Format shared Material primitive integration

This commit is contained in:
2026-11-11 21:17:32 +00:00
parent 16dab6d74e
commit 16f4e43ddc
12 changed files with 35 additions and 38 deletions
@@ -108,7 +108,10 @@ class GraphStageNode extends StatelessWidget {
// coloured, smaller text in the status's own hue.
final color = status == null
? null
: runStatusColor(graphStatusState(status), Theme.of(context).colorScheme);
: runStatusColor(
graphStatusState(status),
Theme.of(context).colorScheme,
);
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -238,7 +238,10 @@ class PipelineListPanel extends StatelessWidget {
? null
: AppListStatusDot(
key: Key('pipeline-status-${pipeline.id}'),
color: runStatusColor(badge.state, Theme.of(context).colorScheme),
color: runStatusColor(
badge.state,
Theme.of(context).colorScheme,
),
semanticLabel: runStateLabel(badge.state),
),
subtitle: Text(
@@ -280,10 +283,7 @@ class PipelineListPanel extends StatelessWidget {
/// The pipeline's initial on a tint picked from its id, so neighbouring
/// pipelines are told apart at a glance.
Widget _pipelineIdentityIcon(
BuildContext context,
PipelineSummary pipeline,
) {
Widget _pipelineIdentityIcon(BuildContext context, PipelineSummary pipeline) {
final scheme = Theme.of(context).colorScheme;
final colors = [scheme.primary, scheme.secondary, scheme.tertiary];
return Semantics(
@@ -145,7 +145,7 @@ class RunTimelineRow extends StatelessWidget {
divider: divider,
onTap: onTap,
leading: AppListAvatar(
foreground: runStatusColor(state, Theme.of(context).colorScheme),
foreground: runStatusColor(state, Theme.of(context).colorScheme),
child: RunStatusIcon(
state: state,
label: visit.status.isEmpty ? 'Status unavailable' : visit.status,
+1 -1
View File
@@ -126,7 +126,7 @@ class RunListRow extends StatelessWidget {
onLongPress: selecting ? null : onLongPress,
selectionControl: selecting ? _checkbox(context) : null,
leading: AppListAvatar(
foreground: runStatusColor(state, Theme.of(context).colorScheme),
foreground: runStatusColor(state, Theme.of(context).colorScheme),
child: RunStatusIcon(state: state, label: runStatusLabel(run)),
),
title: Text(title),
+1 -1
View File
@@ -59,7 +59,7 @@ class RunPathMini extends StatelessWidget {
width: 14,
height: 10,
decoration: BoxDecoration(
color: runStatusColor(stage.state, Theme.of(context).colorScheme),
color: runStatusColor(stage.state, Theme.of(context).colorScheme),
borderRadius: BorderRadius.circular(3),
),
);
@@ -14,9 +14,9 @@ import 'runs_controller.dart';
/// Opens the runs' usage and charts on their own page.
Future<void> openRunsStats(BuildContext context, RunsController controller) {
final page = RunsStatsPage(controller: controller);
return Navigator.of(context).push<void>(
MaterialPageRoute<void>(builder: (_) => page),
);
return Navigator.of(
context,
).push<void>(MaterialPageRoute<void>(builder: (_) => page));
}
/// Usage totals, runs by status (a pie) and runs per day for the last week.
@@ -92,7 +92,10 @@ class RunsStatsPage extends StatelessWidget {
painter: _PiePainter([
for (final entry in byState.entries)
(
runStatusColor(entry.key, Theme.of(context).colorScheme),
runStatusColor(
entry.key,
Theme.of(context).colorScheme,
),
entry.value,
),
]),