QuantityRange<Q extends Quantity> constructor

QuantityRange<Q extends Quantity>(
  1. Q q1,
  2. Q q2
)

Constructs a quantity range, from q1 to q2.

Implementation

QuantityRange(this.q1, this.q2) {
  if (q1 is! Quantity || q2 is! Quantity) {
    throw const QuantityException('QuantityRange endpoints must be Quantity objects');
  }
}