super_measurement 1.0.11
super_measurement: ^1.0.11 copied to clipboard
Dart package for converting unit measurement
Dart package for converting unit measurement #
Available Unit #
Can be accessed using enum #
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
DataStorage #
Bit=> DataStorageUnit.bitByte=> DataStorageUnit.byteGigabit=> DataStorageUnit.gigabitGigabyte=> DataStorageUnit.gigabyteKilobit=> DataStorageUnit.kilobitKilobyte=> DataStorageUnit.kilobyteMegabit=> DataStorageUnit.megabitMegabyte=> DataStorageUnit.megabyteTerabit=> DataStorageUnit.terabitTerabyte=> DataStorageUnit.terabyte
DataTransfer #
GigabitPerSecond=> DataTransferUnit.gigabitPerSecondGigabytePerSecond=> DataTransferUnit.gigabytePerSecondKilobitPerSecond=> DataTransferUnit.kilobitPerSecondKilobytePerSecond=> DataTransferUnit.kilobytePerSecondMegabitPerSecond=> DataTransferUnit.megabitPerSecondMegabytePerSecond=> DataTransferUnit.megabytePerSecond
Energy #
CalorieInternational=> EnergyUnit.calorieInternationalCalorieNutritional=> EnergyUnit.calorieNutritionalCalorieThermochemical=> EnergyUnit.calorieThermochemicalElectronVolt=> EnergyUnit.electronVoltGigaJoule=> EnergyUnit.gigaJouleJoule=> EnergyUnit.jouleKiloJoule=> EnergyUnit.kiloJouleKilowattHour=> EnergyUnit.kilowattHourMegaJoule=> EnergyUnit.megaJouleMegawattHour=> EnergyUnit.megawattHourWattHour=> EnergyUnit.wattHour
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
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
Speed #
FootPerHour=> SpeedUnit.footPerHourFootPerMinute=> SpeedUnit.footPerMinuteFootPerSecond=> SpeedUnit.footPerSecondKilometerPerHour=> SpeedUnit.kilometerPerHourKnot=> SpeedUnit.knotLight=> SpeedUnit.lightMeterPerHour=> SpeedUnit.meterPerHourMeterPerMinute=> SpeedUnit.meterPerMinuteMeterPerSecond=> SpeedUnit.meterPerSecondMilesPerHour=> SpeedUnit.milesPerHourMilesPerMinute=> SpeedUnit.milesPerMinuteYardPerMinute=> SpeedUnit.yardPerMinute
Time #
Day=> TimeUnit.dayHour=> TimeUnit.hourMillisecond=> TimeUnit.millisecondMinute=> TimeUnit.minuteSecond=> TimeUnit.secondWeek=> TimeUnit.weekYear=> TimeUnit.year
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