MolarVolume constructor

MolarVolume({
  1. int significantFigures = 10,
  2. bool removeTrailingZeros = true,
  3. bool useScientificNotation = true,
  4. dynamic name,
})

Class for molar volume conversions, e.g. if you want to convert 1 mole per liter in moles per milliliter:

var molarVolume = MolarVolume(removeTrailingZeros: false);
molarVolume.convert(Unit(MOLAR_VOLUME.molesPerLiter, value: 1));
print(MOLAR_VOLUME.molesPerMilliliter);

Implementation

MolarVolume(
    {super.significantFigures,
    super.removeTrailingZeros,
    super.useScientificNotation,
    name})
    : assert(_mapSymbols.length == MOLAR_VOLUME.values.length),
      super(
          name: name ?? PROPERTY.molarvolume,
          numeratorProperty:
              getPropertyFromEnum(MOLAR_VOLUME.values[0].numerator)!,
          denominatorProperty:
              getPropertyFromEnum(MOLAR_VOLUME.values[0].denominator)!,
          mapSymbols: _mapSymbols);