Metric constructor Null safety

Metric(
  1. String name,
  2. String description
)

Implementation

Metric(this.name, this.description) {
  if ((name == 'vm') || name.contains('/')) {
    throw ArgumentError('Invalid Metric name.');
  }
}