Gauge constructor Null safety

Gauge(
  1. String name,
  2. String description,
  3. double min,
  4. double max
)

Implementation

Gauge(String name, String description, this.min, this.max)
    : _value = min,
      super(name, description) {
  // TODO: When NNBD is complete, delete the following two lines.
  ArgumentError.checkNotNull(min, 'min');
  ArgumentError.checkNotNull(max, 'max');
  if (!(min < max)) throw ArgumentError('min must be less than max');
}