convert method

  1. @override
void convert(
  1. POWER name,
  2. double? value
)
override

Converts a unit with a specific name (e.g. POWER.european_horse_power) and value to all other units

Implementation

@override
void convert(POWER name, double? value) {
  super.convert(name, value);
  if (value == null) return;
  for (var i = 0; i < POWER.values.length; i++) {
    unitList[i].value = unitConversion.getByName(POWER.values.elementAt(i))?.value;
    unitList[i].stringValue = mantissaCorrection(unitList[i].value!, significantFigures, removeTrailingZeros);
  }
}