GuardrailStatusPanel constructor
GuardrailStatusPanel({
- Key? key,
- required List<
GuardrailStatusRow> rows, - String title = 'Rollout guardrails',
- String emptyLabel = 'No guardrails registered.',
- String noDataLabel = 'No data yet',
- String okLabel = 'Within limits',
- String violatedLabel = 'Rolled back on this device',
- String boundsLabel = 'Limits',
- String currentLabel = 'Current',
Implementation
GuardrailStatusPanel({
super.key,
required List<GuardrailStatusRow> rows,
this.title = 'Rollout guardrails',
this.emptyLabel = 'No guardrails registered.',
this.noDataLabel = 'No data yet',
this.okLabel = 'Within limits',
this.violatedLabel = 'Rolled back on this device',
this.boundsLabel = 'Limits',
this.currentLabel = 'Current',
}) : rows = List.unmodifiable(rows) {
for (final (name, value) in [
('title', title),
('emptyLabel', emptyLabel),
('noDataLabel', noDataLabel),
('okLabel', okLabel),
('violatedLabel', violatedLabel),
('boundsLabel', boundsLabel),
('currentLabel', currentLabel),
]) {
if (value.trim().isEmpty) {
throw ArgumentError.value(value, name, 'must not be blank');
}
}
}