super_measurement 1.0.7 super_measurement: ^1.0.7 copied to clipboard
Dart package for converting unit measurement
Dart package for converting unit measurement #
Available Unit #
AngularSpeed #
DegreePerDay
DegreePerHour
DegreePerMinute
DegreePerSecond
RadianPerDay
RadianPerHour
RadianPerMinute
RadianPerSecond
RevolutionPerDay
RevolutionPerHour
RevolutionPerMinute
RevolutionPerSecond
Area #
Acres
Hectares
SquareCentimeters
SquareFoot
SquareInches
SquareKilometers
SquareMeters
SquareMiles
SquareYards
DataStorage #
Bit
Byte
Gigabit
Gigabyte
Kilobit
Kilobyte
Megabit
Megabyte
Terabit
Terabyte
DataTransfer #
GigabitPerSecond
GigabytePerSecond
KilobitPerSecond
KilobytePerSecond
MegabitPerSecond
MegabytePerSecond
Energy #
CalorieInternational
CalorieNutritional
CalorieThermochemical
ElectronVolt
GigaJoule
Joule
KiloJoule
KilowattHour
MegaJoule
MegawattHour
WattHour
Length #
Centimeters
Feet
Furlongs
Inches
Kilometers
Meters
Miles
Millemeters
NauticalMiles
Yards
Mass #
Carats
Grams
Kilograms
Milligrams
Ounces
Pounds
Quintal
StoneUK
TonUK
TonUS
Tonne
Power #
Horsepower
Kilowatt
Megawatt
Milliwatt
Watt
Pressure #
Bar
InchesOfMercury
MillimeterOfMercury
Pascal
PoundsPerSquareInch
StandardAtmosphere
Torr
Speed #
FootPerHour
FootPerMinute
FootPerSecond
KilometerPerHour
Knot
Light
MeterPerHour
MeterPerMinute
MeterPerSecond
MilesPerHour
MilesPerMinute
YardPerMinute
Time #
Day
Hour
Millisecond
Minute
Second
Week
Year
Volume #
BarrelsImperial
BarrelsUS
CubicCentimeters
CubicFoot
CubicInches
CubicMeters
CubicYards
GallonsImperial
GallonsUS
Liters
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