Skip to content

Commit

Permalink
Show all statuses on dashboard header
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Jul 3, 2023
1 parent 13eb642 commit bfd9ccd
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions frontend/lib/ui/dashboard/dashboard_header.dart
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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<Widget>(
(status) =>
_LegendEntry(icon: status.icon, text: status.name),
)
.toList()
.intersperse(const SizedBox(width: Spacing.level4))
.toList(),
),
],
),
Expand Down

0 comments on commit bfd9ccd

Please sign in to comment.