convertQuantity method
double
convertQuantity({
- required UnitOfMeasuresDto newUnit,
- required double value,
- bool removeZeros = false,
Implementation
double convertQuantity({
required UnitOfMeasuresDto newUnit,
required double value,
bool removeZeros = false,
}) {
double temp = value;
temp *= numerator;
temp /= denominator;
temp /= newUnit.numerator;
temp *= newUnit.denominator;
return temp;
}