Scale<T> constructor

Scale<T>(
  1. T minimum,
  2. T maximum, [
  3. T? length
])

Implementation

Scale(this.minimum, this.maximum, [T? length]) {
  try {
    length ??= computeLength(maximum, minimum);
  }
  // ignore: empty_catches
  catch (ignore) {}

  if (length == null) {
    throw StateError("Can't compute scale length!");
  }

  _length = length;
}