in current_results_ui/lib/results.dart [92:177]
Widget build(BuildContext context) {
final name = widget.name;
final changeGroups = widget.changeGroups;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 28.0,
padding: EdgeInsets.only(top: 0.0, left: 8.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
icon: Icon(expanded ? Icons.expand_less : Icons.expand_more),
onPressed: () => setState(() => expanded = !expanded),
),
for (final item in countItems(widget.counts))
Container(
width: 24,
alignment: Alignment.center,
margin: EdgeInsets.symmetric(horizontal: 1.0),
decoration: BoxDecoration(
color: item.color,
shape: BoxShape.circle,
),
child: Text(item.text, style: TextStyle(fontSize: 14.0)),
),
Expanded(
flex: 1,
child: Container(
padding: EdgeInsets.only(left: 4.0),
alignment: Alignment.centerLeft,
child: SelectableText(
name,
style: TextStyle(fontSize: 16.0),
maxLines: 1,
),
),
),
IconButton(
icon: Icon(Icons.history),
onPressed: () => html.window.open(
Uri(
path: '/',
fragment: 'showLatestFailures=false&test=$name')
.toString(),
'_blank')),
],
),
),
if (expanded)
for (final change in changeGroups.keys)
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.only(left: 48.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(top: 12.0),
child: Text(
'$change (${changeGroups[change].length} configurations)',
style: TextStyle(
backgroundColor: resultColors[change.kind],
fontSize: 16.0)),
),
for (final result in changeGroups[change])
Row(children: [
Text(result.configuration),
if (change.kind == 'fail')
Padding(
padding: EdgeInsets.only(left: 5),
child: _link("log",
_openTestLog(result.configuration, name))),
Padding(
padding: EdgeInsets.only(left: 5),
child: _link("source",
_openTestSource(result.revision, result.name))),
])
],
),
),
if (expanded) SizedBox(height: 12.0),
],
);
}