diff --git a/app/lib/features/graph/widgets/graph_stage_node.dart b/app/lib/features/graph/widgets/graph_stage_node.dart index dcdaea93..bea4c6b8 100644 --- a/app/lib/features/graph/widgets/graph_stage_node.dart +++ b/app/lib/features/graph/widgets/graph_stage_node.dart @@ -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, diff --git a/app/lib/features/pipelines/widgets/pipeline_list_panel.dart b/app/lib/features/pipelines/widgets/pipeline_list_panel.dart index 3a08b737..619b701d 100644 --- a/app/lib/features/pipelines/widgets/pipeline_list_panel.dart +++ b/app/lib/features/pipelines/widgets/pipeline_list_panel.dart @@ -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( diff --git a/app/lib/features/runs/ui/run_detail_timeline.dart b/app/lib/features/runs/ui/run_detail_timeline.dart index 4fc9c740..f0784202 100644 --- a/app/lib/features/runs/ui/run_detail_timeline.dart +++ b/app/lib/features/runs/ui/run_detail_timeline.dart @@ -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, diff --git a/app/lib/features/runs/ui/run_list_row.dart b/app/lib/features/runs/ui/run_list_row.dart index cd077f5d..00b1d1c8 100644 --- a/app/lib/features/runs/ui/run_list_row.dart +++ b/app/lib/features/runs/ui/run_list_row.dart @@ -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), diff --git a/app/lib/features/runs/ui/run_path_mini.dart b/app/lib/features/runs/ui/run_path_mini.dart index f438c405..09f61d49 100644 --- a/app/lib/features/runs/ui/run_path_mini.dart +++ b/app/lib/features/runs/ui/run_path_mini.dart @@ -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), ), ); diff --git a/app/lib/features/runs/ui/runs_stats_page.dart b/app/lib/features/runs/ui/runs_stats_page.dart index e5b0e201..a0fac91f 100644 --- a/app/lib/features/runs/ui/runs_stats_page.dart +++ b/app/lib/features/runs/ui/runs_stats_page.dart @@ -14,9 +14,9 @@ import 'runs_controller.dart'; /// Opens the runs' usage and charts on their own page. Future openRunsStats(BuildContext context, RunsController controller) { final page = RunsStatsPage(controller: controller); - return Navigator.of(context).push( - MaterialPageRoute(builder: (_) => page), - ); + return Navigator.of( + context, + ).push(MaterialPageRoute(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, ), ]), diff --git a/app/lib/ui/adaptive/floating_tab_button.dart b/app/lib/ui/adaptive/floating_tab_button.dart index cf294371..62629a4d 100644 --- a/app/lib/ui/adaptive/floating_tab_button.dart +++ b/app/lib/ui/adaptive/floating_tab_button.dart @@ -86,8 +86,8 @@ class FloatingTabButton extends StatelessWidget { } String _tabLabel(BuildContext context) => MaterialLocalizations.of( - context, - ).tabLabel(tabIndex: index + 1, tabCount: count); + context, + ).tabLabel(tabIndex: index + 1, tabCount: count); ({Color tint, Color selectedIcon, Color icon}) _colors(BuildContext context) { final scheme = Theme.of(context).colorScheme; @@ -109,15 +109,15 @@ class FloatingTabButton extends StatelessWidget { shape: const CircleBorder(), ); final Widget fill = Ink( - key: fillKey, - decoration: decoration, - child: InkResponse( - onTap: onTap, - customBorder: const CircleBorder(), - containedInkWell: true, - highlightShape: BoxShape.circle, - ), - ); + key: fillKey, + decoration: decoration, + child: InkResponse( + onTap: onTap, + customBorder: const CircleBorder(), + containedInkWell: true, + highlightShape: BoxShape.circle, + ), + ); Widget glyph = IconTheme.merge( data: IconThemeData( size: iconSize, diff --git a/app/lib/ui/adaptive/resize_grip.dart b/app/lib/ui/adaptive/resize_grip.dart index 3dd5d721..a8186332 100644 --- a/app/lib/ui/adaptive/resize_grip.dart +++ b/app/lib/ui/adaptive/resize_grip.dart @@ -22,9 +22,7 @@ class AdaptiveResizeGrip extends StatelessWidget { color: Theme.of(context).colorScheme.surfaceContainerHigh, borderRadius: BorderRadius.circular(8), border: emphasized - ? Border.all( - color: Theme.of(context).colorScheme.primary, - ) + ? Border.all(color: Theme.of(context).colorScheme.primary) : null, ), child: Padding( diff --git a/app/lib/ui/adaptive/segmented_bar_overflow.dart b/app/lib/ui/adaptive/segmented_bar_overflow.dart index 577f4115..807d5974 100644 --- a/app/lib/ui/adaptive/segmented_bar_overflow.dart +++ b/app/lib/ui/adaptive/segmented_bar_overflow.dart @@ -122,5 +122,4 @@ class SegmentedMoreButton extends StatelessWidget { ), ); } - } diff --git a/app/lib/ui/adaptive/segmented_bar_pieces.dart b/app/lib/ui/adaptive/segmented_bar_pieces.dart index 1893a505..0f770039 100644 --- a/app/lib/ui/adaptive/segmented_bar_pieces.dart +++ b/app/lib/ui/adaptive/segmented_bar_pieces.dart @@ -5,8 +5,7 @@ import 'segmented_bar_motion.dart'; /// The smallest height of every piece of a [SegmentedBar]: the platform's /// minimum touch target, so a round Back is a circle. -double segmentedPieceHeight(bool cupertino) => - kMinInteractiveDimension; +double segmentedPieceHeight(bool cupertino) => kMinInteractiveDimension; /// One rounded piece of a segmented bar: a [GlassPill] at least the /// platform's touch-target size. diff --git a/app/lib/ui/navigation/bar_icon_button.dart b/app/lib/ui/navigation/bar_icon_button.dart index f32c7394..9d84285d 100644 --- a/app/lib/ui/navigation/bar_icon_button.dart +++ b/app/lib/ui/navigation/bar_icon_button.dart @@ -21,6 +21,7 @@ class BarIconButton extends StatelessWidget { }); final IconData icon; + /// Retained for source compatibility; Material rendering always uses [icon]. final IconData? cupertinoIcon; diff --git a/app/test/features/runs/ui/run_path_mini_test.dart b/app/test/features/runs/ui/run_path_mini_test.dart index 3b5f71a2..a81dbc47 100644 --- a/app/test/features/runs/ui/run_path_mini_test.dart +++ b/app/test/features/runs/ui/run_path_mini_test.dart @@ -45,13 +45,7 @@ void main() { final scheme = Theme.of( tester.element(find.byKey(const Key('run-path-mini'))), ).colorScheme; - expect( - colors, - contains(runStatusColor('succeeded', scheme).toARGB32()), - ); - expect( - colors, - contains(runStatusColor('failed', scheme).toARGB32()), - ); + expect(colors, contains(runStatusColor('succeeded', scheme).toARGB32())); + expect(colors, contains(runStatusColor('failed', scheme).toARGB32())); }); }