GuardrailStatusRow constructor

GuardrailStatusRow({
  1. required String featureLabel,
  2. required String metricLabel,
  3. required GuardrailRowState state,
  4. String? boundsText,
  5. String? currentText,
})

Implementation

GuardrailStatusRow({
  required this.featureLabel,
  required this.metricLabel,
  required this.state,
  this.boundsText,
  this.currentText,
}) {
  for (final (name, value) in [
    ('featureLabel', featureLabel),
    ('metricLabel', metricLabel),
    ('boundsText', boundsText),
    ('currentText', currentText),
  ]) {
    if (value != null && value.trim().isEmpty) {
      throw ArgumentError.value(value, name, 'must not be blank');
    }
  }
}