diff --git a/frontend/lib/ui/dashboard/dashboard_header.dart b/frontend/lib/ui/dashboard/dashboard_header.dart index 7603f614..db16e595 100644 --- a/frontend/lib/ui/dashboard/dashboard_header.dart +++ b/frontend/lib/ui/dashboard/dashboard_header.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:yaru/yaru.dart'; -import 'package:yaru_icons/yaru_icons.dart'; +import 'package:intersperse/intersperse.dart'; +import '../../models/test_execution.dart'; import '../spacing.dart'; class DashboardHeader extends StatelessWidget { @@ -29,23 +29,15 @@ class DashboardHeader extends StatelessWidget { style: Theme.of(context).textTheme.headlineLarge, ), const SizedBox(height: Spacing.level4), - const Row( - children: [ - _LegendEntry( - icon: Icon(YaruIcons.ok, color: YaruColors.success), - text: 'Passed', - ), - SizedBox(width: Spacing.level4), - _LegendEntry( - icon: Icon(YaruIcons.error, color: YaruColors.red), - text: 'Failed', - ), - SizedBox(width: Spacing.level4), - _LegendEntry( - icon: Icon(YaruIcons.information), - text: 'No result', - ), - ], + Row( + children: TestExecutionStatus.values + .map( + (status) => + _LegendEntry(icon: status.icon, text: status.name), + ) + .toList() + .intersperse(const SizedBox(width: Spacing.level4)) + .toList(), ), ], ),