scaleToRateUnit method

  1. @override
Weight scaleToRateUnit(
  1. Weight input,
  2. RateUnit rateUnit
)
override

Scales input, which is assumed to be a rated unit of measurement, so that its rate is rateUnit.

This method is irrelevant to non rated units of measurement, which can simply throw UnsupportedError.

Implementation

@override
Weight scaleToRateUnit(Weight input, RateUnit rateUnit) =>
    throw UnsupportedError('Cannot scale Weight to a RateUnit');