MetricsCardRow.fromDef constructor

MetricsCardRow.fromDef(
  1. MetricDef def, {
  2. String? subtitle,
})

Row def from a MetricDef (canonical label/unit) + optional subtitle.

Implementation

factory MetricsCardRow.fromDef(MetricDef def, {String? subtitle}) =>
    MetricsCardRow(
      key: def.key,
      label: def.label,
      unit: def.unit,
      subtitle: subtitle,
    );