build method
- @override
- BuildContext context,
- Metrics<
Message> model
override
Builds the UI according to the state in model
.
Implementation
@override
Widget build(BuildContext context, Metrics model) => ExpansionTile(
expandedCrossAxisAlignment: CrossAxisAlignment.start,
expandedAlignment: Alignment.centerLeft,
childrenPadding: const EdgeInsets.symmetric(horizontal: 16),
title: Text(
model.name,
style: Theme.of(context).textTheme.headlineSmall
?.copyWith(color: model.overallSeverity?.color),
),
children: [
for (final MetricLine metric in model.allMetrics) Text(
metric.text,
style: TextStyle(color: metric.severity?.color),
),
const SizedBox(height: 4),
],
);