conversion_units 0.1.1 copy "conversion_units: ^0.1.1" to clipboard
conversion_units: ^0.1.1 copied to clipboard

outdated

Unit of measurements conversions

DartUnits #

Pub.Dev Build GitHub license GitHub Releases GitHub Issues

The main aim for this project is to produce conversion functions for the various units of measurement (listed below). The code and the unit tests are auto-generated by the UnitCodeGenerator tool. Hence any changes need to made within the definitions file.

Note: I am not proficient in the preferred idioms or design paradigms of Dart at this time, so the design may change once I learn more about the preferred ways of coding Swift. Ofcourse the actual functionality is unhindered by such design choices.

Unit conversions also available for #

C#
F#
Java
Python
Rust
Swift
TypeScript

Example #

Example of usage:

import 'package:conversion_units/conversion_units.dart';

var fahrenheit = Celsius.toFahrenheit(12.0);

Each unit of measure then includes functions to convert to each for example, converting each Temperature unit of measure to each other Temperature.

Angle #

* Degrees (deg)
* Gradians (grad)
* Milliradians (mrad)
* Minute Of Arc (arcmin)
* Radians (rad)
* Seconds Of Arc (arcseconds)

Area #

* Acres (acre)
* Hectares (hectare)
* Square Feet (feet2)
* Square Inches (inch2)
* Square Kilometres (km2)
* Square Metres (m2)
* Square Miles (mile2)
* Square Yards (yard2)

Data Storage #

* Bits (b)
* Gigabits (Gb)
* Gigabytes (GB)
* Kibibits (kibibit)
* Kilobits (k)
* Kilobytes (KB)
* Mebibits (mebibit)
* Megabits (Mb)
* Megabytes (MB)
* Terabits (Tb)
* Terabytes (TB)

Data Transfer Rate #

* Bits Per Second (bps)
* GigaBits Per Second (Gbps)
* GigaBytes Per Second (GBps)
* Kibibits Per Second (Kibitps)
* KiloBits Per Second (kbps)
* KiloBytes Per Second (kBps)
* Mebibits Per Second (Mibit)
* MegaBits Per Second (Mbps)
* MegaBytes Per Second (MBps)
* TeraBits Per Second (Tbps)
* TeraBytes Per Second (TBps)

Energy #

* Btu (btu)
* Calories (cal)
* Electronvolts (eV)
* Foot Pounds (ftlb)
* Joules (J)
* Kilocalories (kCal)
* Kilojoules (kJ)
* Kilowatt Hours (kWh)
* US Therms (ustherm)
* Watt Hours (Wh)

Force #

* Dynes (dyn)
* Kilogram-force (kp)
* Newtons (N)
* Poundals (pdl)

Frequency #

* Gigahertz (GHz)
* Hertz (Hz)
* Kilohertz (kHz)
* Megahertz (MHz)

Fuel Economy #

* Kilometre Per Litre (kml)
* Litres Per 100 Kilometres (l100km)
* Miles Per Gallon (mpg)
* US Miles Per Gallon (usmpg)

Length #

* Centimetres (cm)
* Feet (ft)
* Inches (inch)
* Kilometres (km)
* Metres (m)
* Miles (mile)
* Millimetres (mm)
* Nautical Miles (NM)
* Yards (yard)

Luminous Energy #

* LumenHour (lmh)
* LumenMinute (lmmin)
* LumenSecond (lms)
* Talbot (T)

Magnetomotive Force #

* Ampere-turns (AT)
* Gilberts (Gi)

Mass #

* Carats (ct)
* Grams (g)
* Kilograms (kg)
* Milligrams (mg)
* Ounces (oz)
* Pounds (lb)
* Stones (stone)
* Tonnes (tonne)

Pressure #

* Atmospheres (atm)
* Bars (b)
* Pascals (Pa)
* Psi (psi)
* Torrs (Torr)

Speed #

* Feet Per Second (fps)
* Kilometres Per Hour (kph)
* Knots (knot)
* Metres Per Second (mps)
* Miles Per Hour (mph)

Temperature #

* Celsius (C)
* Fahrenheit (F)
* Kelvin (K)
* Rankine (R)

Time #

* Centuries (century)
* Days (day)
* Decades (decade)
* Hours (hour)
* Minutes (minute)
* Months (month)
* Seconds (second)
* Weeks (week)
* Years (year)

Volume #

* Fluid Ounces (floz)
* Gallons (gal)
* Kilolitres (kl)
* Litres (l)
* Millilitres (ml)
* Pints (pt)
* Quarts (qt)
* Tablespoons (tbsp)
* Teaspoons (tsp)
* US Cups (uscup)
* US Fluid Ounces (usfloz)
* US Gallons (usgal)
* US Pints (uspt)
* US Quarts (usqt)
* US Tablespoons (ustbsp)
* US Teaspoons (ustsp)

Apps #

The "My Unit Conversions" app. uses the C# (PutridParrot.Units) version of this library and can be obtained from the following stores/locations.

Get it on Google Play Download on the Apple Store Available on Fire

2
likes
0
points
56
downloads

Publisher

unverified uploader

Weekly Downloads

Unit of measurements conversions

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on conversion_units