toMeterPerLiter method

num toMeterPerLiter(
  1. LengthPerVolumeUnit unit
)

convert num from unit to meters per liters

Implementation

num toMeterPerLiter(LengthPerVolumeUnit unit) {
  switch (unit) {
    case LengthPerVolumeUnit.milePerUsGallon:
      return toMeter(LengthUnit.mile).toUSLiquidGallon;
    case LengthPerVolumeUnit.milePerImperialGallon:
      return toMeter(LengthUnit.mile).toImperialGallon;
    case LengthPerVolumeUnit.kilometerPerLiter:
      return toKilometer;
    default:
      return this;
  }
}