Dart package for converting unit measurement
Available Unit
Can be accessed using enum
- Angle
- AngularSpeed
- Area
- Current
- DataStorage
- DataTransfer
- ElectricField
- Energy
- Entropy
- Flow
- Force
- Illumination
- Length
- Mass
- MetricPrefix
- Power
- Pressure
- Sound
- Speed
- SurfaceTension
- Time
- Torque
- Volume
Angle
Degree
=> AngleUnit.degreeGrad
=> AngleUnit.gradMil
=> AngleUnit.milMinuteAngle
=> AngleUnit.minuteAngleOctant
=> AngleUnit.octantPercentOfFullCircle
=> AngleUnit.percentOfFullCircleQuadrant
=> AngleUnit.quadrantRadian
=> AngleUnit.radianRevolution
=> AngleUnit.revolutionSecondAngle
=> AngleUnit.secondAngleSextant
=> AngleUnit.sextantSignAngle
=> AngleUnit.signAngle
AngularSpeed
DegreePerDay
=> AngularSpeedUnit.degreePerDayDegreePerHour
=> AngularSpeedUnit.degreePerHourDegreePerMinute
=> AngularSpeedUnit.degreePerMinuteDegreePerSecond
=> AngularSpeedUnit.degreePerSecondRadianPerDay
=> AngularSpeedUnit.radianPerDayRadianPerHour
=> AngularSpeedUnit.radianPerHourRadianPerMinute
=> AngularSpeedUnit.radianPerMinuteRadianPerSecond
=> AngularSpeedUnit.radianPerSecondRevolutionPerDay
=> AngularSpeedUnit.revolutionPerDayRevolutionPerHour
=> AngularSpeedUnit.revolutionPerHourRevolutionPerMinute
=> AngularSpeedUnit.revolutionPerMinuteRevolutionPerSecond
=> AngularSpeedUnit.revolutionPerSecond
Area
Acres
=> AreaUnit.acresHectares
=> AreaUnit.hectaresSquareCentimeters
=> AreaUnit.squareCentimetersSquareFoot
=> AreaUnit.squareFootSquareInches
=> AreaUnit.squareInchesSquareKilometers
=> AreaUnit.squareKilometersSquareMeters
=> AreaUnit.squareMetersSquareMiles
=> AreaUnit.squareMilesSquareYards
=> AreaUnit.squareYards
Current
Abampere
=> CurrentUnit.abampereAmpere
=> CurrentUnit.ampereBiot
=> CurrentUnit.biotKiloAmpere
=> CurrentUnit.kiloAmpereMilliAmpere
=> CurrentUnit.milliAmpereStatAmpere
=> CurrentUnit.statAmpere
DataStorage
Bit
=> DataStorageUnit.bitBlock
=> DataStorageUnit.blockBluRay
=> DataStorageUnit.bluRayByte
=> DataStorageUnit.byteExabit
=> DataStorageUnit.exabitExabyte
=> DataStorageUnit.exabyteGigabit
=> DataStorageUnit.gigabitGigabyte
=> DataStorageUnit.gigabyteKilobit
=> DataStorageUnit.kilobitKilobyte
=> DataStorageUnit.kilobyteMegabit
=> DataStorageUnit.megabitMegabyte
=> DataStorageUnit.megabyteNibble
=> DataStorageUnit.nibblePetabit
=> DataStorageUnit.petabitPetabyte
=> DataStorageUnit.petabyteTerabit
=> DataStorageUnit.terabitTerabyte
=> DataStorageUnit.terabyte
DataTransfer
GigabitPerSecond
=> DataTransferUnit.gigabitPerSecondGigabytePerSecond
=> DataTransferUnit.gigabytePerSecondKilobitPerSecond
=> DataTransferUnit.kilobitPerSecondKilobytePerSecond
=> DataTransferUnit.kilobytePerSecondMegabitPerSecond
=> DataTransferUnit.megabitPerSecondMegabytePerSecond
=> DataTransferUnit.megabytePerSecond
ElectricField
MicrovoltPerMeter
=> ElectricFieldUnit.microvoltPerMeterMilivoltPerMeter
=> ElectricFieldUnit.milivoltPerMeterStatvoltPerCentimeter
=> ElectricFieldUnit.statvoltPerCentimeterStatvoltPerInch
=> ElectricFieldUnit.statvoltPerInchVoltPerCentimeter
=> ElectricFieldUnit.voltPerCentimeterVoltPerInch
=> ElectricFieldUnit.voltPerInchVoltPerMeter
=> ElectricFieldUnit.voltPerMeter
Energy
CalorieInternational
=> EnergyUnit.calorieInternationalCalorieNutritional
=> EnergyUnit.calorieNutritionalCalorieThermochemical
=> EnergyUnit.calorieThermochemicalElectronVolt
=> EnergyUnit.electronVoltGigaJoule
=> EnergyUnit.gigaJouleJoule
=> EnergyUnit.jouleKiloJoule
=> EnergyUnit.kiloJouleKilowattHour
=> EnergyUnit.kilowattHourMegaJoule
=> EnergyUnit.megaJouleMegawattHour
=> EnergyUnit.megawattHourWattHour
=> EnergyUnit.wattHour
Entropy
JoulePerKilogramCelcius
=> EntropyUnit.joulePerKilogramCelciusKilocaloriePerKilogramCelcius
=> EntropyUnit.kilocaloriePerKilogramCelciusKilojoulePerKilogramCelcius
=> EntropyUnit.kilojoulePerKilogramCelcius
Flow
FootCubicPerHour
=> FlowUnit.footCubicPerHourFootCubicPerMinute
=> FlowUnit.footCubicPerMinuteInchCubicPerHour
=> FlowUnit.inchCubicPerHourInchCubicPerMinute
=> FlowUnit.inchCubicPerMinuteLiterPerDay
=> FlowUnit.literPerDayLiterPerHour
=> FlowUnit.literPerHourLiterPerMinute
=> FlowUnit.literPerMinuteMeterCubicPerDay
=> FlowUnit.meterCubicPerDayMeterCubicPerHour
=> FlowUnit.meterCubicPerHourMeterCubicPerMinute
=> FlowUnit.meterCubicPerMinute
Force
GramForce
=> ForceUnit.gramForceJoulePerCentimeter
=> ForceUnit.joulePerCentimeterKilogramForce
=> ForceUnit.kilogramForceKilonewton
=> ForceUnit.kilonewtonNewton
=> ForceUnit.newtonOunceForce
=> ForceUnit.ounceForcePoundForce
=> ForceUnit.poundForcePoundal
=> ForceUnit.poundal
Illumination
Flame
=> IlluminationUnit.flameLumenPerFootSquare
=> IlluminationUnit.lumenPerFootSquareLumenPerMeterSquare
=> IlluminationUnit.lumenPerMeterSquarePhot
=> IlluminationUnit.phot
Length
Centimeters
=> LengthUnit.centimetersFeet
=> LengthUnit.feetFurlongs
=> LengthUnit.furlongsInches
=> LengthUnit.inchesKilometers
=> LengthUnit.kilometersMeters
=> LengthUnit.metersMiles
=> LengthUnit.milesMillimeters
=> LengthUnit.millimetersNauticalMiles
=> LengthUnit.nauticalMilesYards
=> LengthUnit.yards
Mass
Carats
=> MassUnit.caratsGrams
=> MassUnit.gramsKilograms
=> MassUnit.kilogramsMilligrams
=> MassUnit.milligramsOunces
=> MassUnit.ouncesPounds
=> MassUnit.poundsQuintal
=> MassUnit.quintalStoneUK
=> MassUnit.stoneUKTonUK
=> MassUnit.tonUKTonUS
=> MassUnit.tonUSTonne
=> MassUnit.tonne
MetricPrefix
Atto
=> MetricPrefixUnit.attoCenti
=> MetricPrefixUnit.centiDeci
=> MetricPrefixUnit.deciDeka
=> MetricPrefixUnit.dekaExa
=> MetricPrefixUnit.exaFemto
=> MetricPrefixUnit.femtoGiga
=> MetricPrefixUnit.gigaHecto
=> MetricPrefixUnit.hectoKilo
=> MetricPrefixUnit.kiloMega
=> MetricPrefixUnit.megaMetricUnit
=> MetricPrefixUnit.metricUnitMicro
=> MetricPrefixUnit.microMilli
=> MetricPrefixUnit.milliNano
=> MetricPrefixUnit.nanoPeta
=> MetricPrefixUnit.petaPico
=> MetricPrefixUnit.picoTera
=> MetricPrefixUnit.teraYocto
=> MetricPrefixUnit.yoctoYotta
=> MetricPrefixUnit.yottaZepto
=> MetricPrefixUnit.zeptoZetta
=> MetricPrefixUnit.zetta
Power
Horsepower
=> PowerUnit.horsepowerKilowatt
=> PowerUnit.kilowattMegawatt
=> PowerUnit.megawattMilliwatt
=> PowerUnit.milliwattWatt
=> PowerUnit.watt
Pressure
Bar
=> PressureUnit.barInchesOfMercury
=> PressureUnit.inchesOfMercuryMillimeterOfMercury
=> PressureUnit.millimeterOfMercuryPascal
=> PressureUnit.pascalPoundsPerSquareInch
=> PressureUnit.poundsPerSquareInchStandardAtmosphere
=> PressureUnit.standardAtmosphereTorr
=> PressureUnit.torr
Sound
Bel
=> SoundUnit.belDecibel
=> SoundUnit.decibelNeper
=> SoundUnit.neper
Speed
FootPerHour
=> SpeedUnit.footPerHourFootPerMinute
=> SpeedUnit.footPerMinuteFootPerSecond
=> SpeedUnit.footPerSecondKilometerPerHour
=> SpeedUnit.kilometerPerHourKnot
=> SpeedUnit.knotLight
=> SpeedUnit.lightMachAtSeaLevel
=> SpeedUnit.machAtSeaLevelMachInternational
=> SpeedUnit.machInternationalMeterPerHour
=> SpeedUnit.meterPerHourMeterPerMinute
=> SpeedUnit.meterPerMinuteMeterPerSecond
=> SpeedUnit.meterPerSecondMilesPerHour
=> SpeedUnit.milesPerHourMilesPerMinute
=> SpeedUnit.milesPerMinuteYardPerMinute
=> SpeedUnit.yardPerMinute
SurfaceTension
ErgPerCentimeterSquare
=> SurfaceTensionUnit.ergPerCentimeterSquareGramForcePerCentimeter
=> SurfaceTensionUnit.gramForcePerCentimeterMillinewtonPerMeter
=> SurfaceTensionUnit.millinewtonPerMeterNewtonPerMeter
=> SurfaceTensionUnit.newtonPerMeterPoundForcePerInch
=> SurfaceTensionUnit.poundForcePerInchPoundalPerInch
=> SurfaceTensionUnit.poundalPerInch
Time
Day
=> TimeUnit.dayHour
=> TimeUnit.hourMillisecond
=> TimeUnit.millisecondMinute
=> TimeUnit.minuteSecond
=> TimeUnit.secondWeek
=> TimeUnit.weekYear
=> TimeUnit.year
Torque
DyneCentimeter
=> TorqueUnit.dyneCentimeterDyneMeter
=> TorqueUnit.dyneMeterDyneMillimeter
=> TorqueUnit.dyneMillimeterGramForceCentimeter
=> TorqueUnit.gramForceCentimeterGramForceMeter
=> TorqueUnit.gramForceMeterGramForceMillimeter
=> TorqueUnit.gramForceMillimeterKilogramForceCentimeter
=> TorqueUnit.kilogramForceCentimeterKilogramForceMeter
=> TorqueUnit.kilogramForceMeterKilogramForceMillimeter
=> TorqueUnit.kilogramForceMillimeterKilonewtonMeter
=> TorqueUnit.kilonewtonMeterNewtonCentimeter
=> TorqueUnit.newtonCentimeterNewtonMeter
=> TorqueUnit.newtonMeterNewtonMillimeter
=> TorqueUnit.newtonMillimeterOunceForceFoot
=> TorqueUnit.ounceForceFootOunceForceInch
=> TorqueUnit.ounceForceInchPoundForceFoot
=> TorqueUnit.poundForceFootPoundForceInch
=> TorqueUnit.poundForceInch
Volume
BarrelsImperial
=> VolumeUnit.barrelsImperialBarrelsUS
=> VolumeUnit.barrelsUSCubicCentimeters
=> VolumeUnit.cubicCentimetersCubicFoot
=> VolumeUnit.cubicFootCubicInches
=> VolumeUnit.cubicInchesCubicMeters
=> VolumeUnit.cubicMetersCubicYards
=> VolumeUnit.cubicYardsGallonsImperial
=> VolumeUnit.gallonsImperialGallonsUS
=> VolumeUnit.gallonsUSLiters
=> VolumeUnit.litersMilliliters
=> VolumeUnit.milliliters
Because the nature of this package, some raw conversion does not resulting in same value, for example:
void main(){
print([Feet(1), Inches(12)].toInches); // 24.00000000006096
print([Feet(1), Inches(12)].toInches.withPrecision()); // 24
print([Feet(1), Inches(12)].toFeet); // 1.9999999999949203
print([Feet(1), Inches(12)].toFeet.withPrecision()); // 2
print(Inches(12).toFeet); // 0.9999999999949201
print(Inches(12).toFeet.withPrecision()); // 1
print(Inches(12).toInches); // 12
print(Inches(12).toInches.withPrecision()); // 12
print(Feet(1).toFeet); // 1
print(Feet(1).toFeet.withPrecision()); // 1
print(Feet(1).toInches); // 12.000000000060961
print(Feet(1).toInches.withPrecision()); // 12
}
Use withPrecision()
for more precision
See example for usage
Libraries
- super_measurement
- Dart library for doing various unit conversion with ease