super_measurement 1.1.0 copy "super_measurement: ^1.1.0" to clipboard
super_measurement: ^1.1.0 copied to clipboard

Dart package for converting various unit measurement with ease

Dart package for converting unit measurement #

Available Unit #

Can be accessed using enum #

Angle #

  • Degree => AngleUnit.degree
  • Grad => AngleUnit.grad
  • Mil => AngleUnit.mil
  • MinuteAngle => AngleUnit.minuteAngle
  • Octant => AngleUnit.octant
  • PercentOfFullCircle => AngleUnit.percentOfFullCircle
  • Quadrant => AngleUnit.quadrant
  • Radian => AngleUnit.radian
  • Revolution => AngleUnit.revolution
  • SecondAngle => AngleUnit.secondAngle
  • Sextant => AngleUnit.sextant
  • SignAngle => AngleUnit.signAngle

AngularSpeed #

  • DegreePerDay => AngularSpeedUnit.degreePerDay
  • DegreePerHour => AngularSpeedUnit.degreePerHour
  • DegreePerMinute => AngularSpeedUnit.degreePerMinute
  • DegreePerSecond => AngularSpeedUnit.degreePerSecond
  • RadianPerDay => AngularSpeedUnit.radianPerDay
  • RadianPerHour => AngularSpeedUnit.radianPerHour
  • RadianPerMinute => AngularSpeedUnit.radianPerMinute
  • RadianPerSecond => AngularSpeedUnit.radianPerSecond
  • RevolutionPerDay => AngularSpeedUnit.revolutionPerDay
  • RevolutionPerHour => AngularSpeedUnit.revolutionPerHour
  • RevolutionPerMinute => AngularSpeedUnit.revolutionPerMinute
  • RevolutionPerSecond => AngularSpeedUnit.revolutionPerSecond

Area #

  • Acres => AreaUnit.acres
  • Hectares => AreaUnit.hectares
  • SquareCentimeters => AreaUnit.squareCentimeters
  • SquareFoot => AreaUnit.squareFoot
  • SquareInches => AreaUnit.squareInches
  • SquareKilometers => AreaUnit.squareKilometers
  • SquareMeters => AreaUnit.squareMeters
  • SquareMiles => AreaUnit.squareMiles
  • SquareYards => AreaUnit.squareYards

Current #

  • Abampere => CurrentUnit.abampere
  • Ampere => CurrentUnit.ampere
  • Biot => CurrentUnit.biot
  • KiloAmpere => CurrentUnit.kiloAmpere
  • MilliAmpere => CurrentUnit.milliAmpere
  • StatAmpere => CurrentUnit.statAmpere

DataStorage #

  • Bit => DataStorageUnit.bit
  • Block => DataStorageUnit.block
  • BluRay => DataStorageUnit.bluRay
  • Byte => DataStorageUnit.byte
  • Exabit => DataStorageUnit.exabit
  • Exabyte => DataStorageUnit.exabyte
  • Gigabit => DataStorageUnit.gigabit
  • Gigabyte => DataStorageUnit.gigabyte
  • Kilobit => DataStorageUnit.kilobit
  • Kilobyte => DataStorageUnit.kilobyte
  • Megabit => DataStorageUnit.megabit
  • Megabyte => DataStorageUnit.megabyte
  • Nibble => DataStorageUnit.nibble
  • Petabit => DataStorageUnit.petabit
  • Petabyte => DataStorageUnit.petabyte
  • Terabit => DataStorageUnit.terabit
  • Terabyte => DataStorageUnit.terabyte

DataTransfer #

  • GigabitPerSecond => DataTransferUnit.gigabitPerSecond
  • GigabytePerSecond => DataTransferUnit.gigabytePerSecond
  • KilobitPerSecond => DataTransferUnit.kilobitPerSecond
  • KilobytePerSecond => DataTransferUnit.kilobytePerSecond
  • MegabitPerSecond => DataTransferUnit.megabitPerSecond
  • MegabytePerSecond => DataTransferUnit.megabytePerSecond

ElectricField #

  • MicrovoltPerMeter => ElectricFieldUnit.microvoltPerMeter
  • MilivoltPerMeter => ElectricFieldUnit.milivoltPerMeter
  • StatvoltPerCentimeter => ElectricFieldUnit.statvoltPerCentimeter
  • StatvoltPerInch => ElectricFieldUnit.statvoltPerInch
  • VoltPerCentimeter => ElectricFieldUnit.voltPerCentimeter
  • VoltPerInch => ElectricFieldUnit.voltPerInch
  • VoltPerMeter => ElectricFieldUnit.voltPerMeter

Energy #

  • CalorieInternational => EnergyUnit.calorieInternational
  • CalorieNutritional => EnergyUnit.calorieNutritional
  • CalorieThermochemical => EnergyUnit.calorieThermochemical
  • ElectronVolt => EnergyUnit.electronVolt
  • GigaJoule => EnergyUnit.gigaJoule
  • Joule => EnergyUnit.joule
  • KiloJoule => EnergyUnit.kiloJoule
  • KilowattHour => EnergyUnit.kilowattHour
  • MegaJoule => EnergyUnit.megaJoule
  • MegawattHour => EnergyUnit.megawattHour
  • WattHour => EnergyUnit.wattHour

Entropy #

  • JoulePerKilogramCelcius => EntropyUnit.joulePerKilogramCelcius
  • KilocaloriePerKilogramCelcius => EntropyUnit.kilocaloriePerKilogramCelcius
  • KilojoulePerKilogramCelcius => EntropyUnit.kilojoulePerKilogramCelcius

Flow #

  • FootCubicPerHour => FlowUnit.footCubicPerHour
  • FootCubicPerMinute => FlowUnit.footCubicPerMinute
  • InchCubicPerHour => FlowUnit.inchCubicPerHour
  • InchCubicPerMinute => FlowUnit.inchCubicPerMinute
  • LiterPerDay => FlowUnit.literPerDay
  • LiterPerHour => FlowUnit.literPerHour
  • LiterPerMinute => FlowUnit.literPerMinute
  • MeterCubicPerDay => FlowUnit.meterCubicPerDay
  • MeterCubicPerHour => FlowUnit.meterCubicPerHour
  • MeterCubicPerMinute => FlowUnit.meterCubicPerMinute

Force #

  • GramForce => ForceUnit.gramForce
  • JoulePerCentimeter => ForceUnit.joulePerCentimeter
  • KilogramForce => ForceUnit.kilogramForce
  • Kilonewton => ForceUnit.kilonewton
  • Newton => ForceUnit.newton
  • OunceForce => ForceUnit.ounceForce
  • PoundForce => ForceUnit.poundForce
  • Poundal => ForceUnit.poundal

Illumination #

  • Flame => IlluminationUnit.flame
  • LumenPerFootSquare => IlluminationUnit.lumenPerFootSquare
  • LumenPerMeterSquare => IlluminationUnit.lumenPerMeterSquare
  • Phot => IlluminationUnit.phot

Length #

  • Centimeters => LengthUnit.centimeters
  • Feet => LengthUnit.feet
  • Furlongs => LengthUnit.furlongs
  • Inches => LengthUnit.inches
  • Kilometers => LengthUnit.kilometers
  • Meters => LengthUnit.meters
  • Miles => LengthUnit.miles
  • Millimeters => LengthUnit.millimeters
  • NauticalMiles => LengthUnit.nauticalMiles
  • Yards => LengthUnit.yards

Mass #

  • Carats => MassUnit.carats
  • Grams => MassUnit.grams
  • Kilograms => MassUnit.kilograms
  • Milligrams => MassUnit.milligrams
  • Ounces => MassUnit.ounces
  • Pounds => MassUnit.pounds
  • Quintal => MassUnit.quintal
  • StoneUK => MassUnit.stoneUK
  • TonUK => MassUnit.tonUK
  • TonUS => MassUnit.tonUS
  • Tonne => MassUnit.tonne

MetricPrefix #

  • Atto => MetricPrefixUnit.atto
  • Centi => MetricPrefixUnit.centi
  • Deci => MetricPrefixUnit.deci
  • Deka => MetricPrefixUnit.deka
  • Exa => MetricPrefixUnit.exa
  • Femto => MetricPrefixUnit.femto
  • Giga => MetricPrefixUnit.giga
  • Hecto => MetricPrefixUnit.hecto
  • Kilo => MetricPrefixUnit.kilo
  • Mega => MetricPrefixUnit.mega
  • MetricUnit => MetricPrefixUnit.metricUnit
  • Micro => MetricPrefixUnit.micro
  • Milli => MetricPrefixUnit.milli
  • Nano => MetricPrefixUnit.nano
  • Peta => MetricPrefixUnit.peta
  • Pico => MetricPrefixUnit.pico
  • Tera => MetricPrefixUnit.tera
  • Yocto => MetricPrefixUnit.yocto
  • Yotta => MetricPrefixUnit.yotta
  • Zepto => MetricPrefixUnit.zepto
  • Zetta => MetricPrefixUnit.zetta

Power #

  • Horsepower => PowerUnit.horsepower
  • Kilowatt => PowerUnit.kilowatt
  • Megawatt => PowerUnit.megawatt
  • Milliwatt => PowerUnit.milliwatt
  • Watt => PowerUnit.watt

Pressure #

  • Bar => PressureUnit.bar
  • InchesOfMercury => PressureUnit.inchesOfMercury
  • MillimeterOfMercury => PressureUnit.millimeterOfMercury
  • Pascal => PressureUnit.pascal
  • PoundsPerSquareInch => PressureUnit.poundsPerSquareInch
  • StandardAtmosphere => PressureUnit.standardAtmosphere
  • Torr => PressureUnit.torr

Sound #

  • Bel => SoundUnit.bel
  • Decibel => SoundUnit.decibel
  • Neper => SoundUnit.neper

Speed #

  • FootPerHour => SpeedUnit.footPerHour
  • FootPerMinute => SpeedUnit.footPerMinute
  • FootPerSecond => SpeedUnit.footPerSecond
  • KilometerPerHour => SpeedUnit.kilometerPerHour
  • Knot => SpeedUnit.knot
  • Light => SpeedUnit.light
  • MachAtSeaLevel => SpeedUnit.machAtSeaLevel
  • MachInternational => SpeedUnit.machInternational
  • MeterPerHour => SpeedUnit.meterPerHour
  • MeterPerMinute => SpeedUnit.meterPerMinute
  • MeterPerSecond => SpeedUnit.meterPerSecond
  • MilesPerHour => SpeedUnit.milesPerHour
  • MilesPerMinute => SpeedUnit.milesPerMinute
  • YardPerMinute => SpeedUnit.yardPerMinute

SurfaceTension #

  • ErgPerCentimeterSquare => SurfaceTensionUnit.ergPerCentimeterSquare
  • GramForcePerCentimeter => SurfaceTensionUnit.gramForcePerCentimeter
  • MillinewtonPerMeter => SurfaceTensionUnit.millinewtonPerMeter
  • NewtonPerMeter => SurfaceTensionUnit.newtonPerMeter
  • PoundForcePerInch => SurfaceTensionUnit.poundForcePerInch
  • PoundalPerInch => SurfaceTensionUnit.poundalPerInch

Time #

  • Day => TimeUnit.day
  • Hour => TimeUnit.hour
  • Millisecond => TimeUnit.millisecond
  • Minute => TimeUnit.minute
  • Second => TimeUnit.second
  • Week => TimeUnit.week
  • Year => TimeUnit.year

Torque #

  • DyneCentimeter => TorqueUnit.dyneCentimeter
  • DyneMeter => TorqueUnit.dyneMeter
  • DyneMillimeter => TorqueUnit.dyneMillimeter
  • GramForceCentimeter => TorqueUnit.gramForceCentimeter
  • GramForceMeter => TorqueUnit.gramForceMeter
  • GramForceMillimeter => TorqueUnit.gramForceMillimeter
  • KilogramForceCentimeter => TorqueUnit.kilogramForceCentimeter
  • KilogramForceMeter => TorqueUnit.kilogramForceMeter
  • KilogramForceMillimeter => TorqueUnit.kilogramForceMillimeter
  • KilonewtonMeter => TorqueUnit.kilonewtonMeter
  • NewtonCentimeter => TorqueUnit.newtonCentimeter
  • NewtonMeter => TorqueUnit.newtonMeter
  • NewtonMillimeter => TorqueUnit.newtonMillimeter
  • OunceForceFoot => TorqueUnit.ounceForceFoot
  • OunceForceInch => TorqueUnit.ounceForceInch
  • PoundForceFoot => TorqueUnit.poundForceFoot
  • PoundForceInch => TorqueUnit.poundForceInch

Volume #

  • BarrelsImperial => VolumeUnit.barrelsImperial
  • BarrelsUS => VolumeUnit.barrelsUS
  • CubicCentimeters => VolumeUnit.cubicCentimeters
  • CubicFoot => VolumeUnit.cubicFoot
  • CubicInches => VolumeUnit.cubicInches
  • CubicMeters => VolumeUnit.cubicMeters
  • CubicYards => VolumeUnit.cubicYards
  • GallonsImperial => VolumeUnit.gallonsImperial
  • GallonsUS => VolumeUnit.gallonsUS
  • Liters => VolumeUnit.liters
  • Milliliters => 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 #

1
likes
150
pub points
5%
popularity

Publisher

verified publishermrcrbrth.my.id

Dart package for converting various unit measurement with ease

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

reusable_tools

More

Packages that depend on super_measurement