Threshold constructor Null safety

const Threshold(
  1. double threshold
)

Creates a threshold curve.

The threshold argument must not be null.

Implementation

const Threshold(this.threshold) : assert(threshold != null);