base_converter 0.0.1 copy "base_converter: ^0.0.1" to clipboard
base_converter: ^0.0.1 copied to clipboard

A Dart library for converting between two unit of base quantities.

base_converter #

base_converter is a dart package that helps you add base quantities' converter functionality to your code. There are 7 basic quantities supported in this package. The Seven Basic Quantities supported in this package are Length, Mass, Time, Temperature, ElectricCurrent, LuminousIntensity and AmountOfSubstance. You can use all seven of them to convert a quantity from one unit to another.

Usage #

This is the example how you can use this package.

final TemperatureUnit originUnit = TemperatureUnit.celsius;
final TemperatureUnit destinationUnit = TemperatureUnit.fahrenheit;
final Temperature t1 = Temperature(10, originUnit);
final num result = t1.convertTo(TemperatureUnit.destinationUnit);
final Temperature t2 = Temperature(result, destinationUnit);

Supported Units #

Length #

  • meter
  • kilometer
  • hectometer
  • dekameter
  • decimeter
  • centimeter
  • milimeter
  • micrometer
  • nanometer
  • gigameter
  • megameter
  • angstrom
  • inch
  • foot
  • yard
  • mile
  • nauticalMile

Mass #

  • kilogram
  • hectogram
  • dekagram
  • gram
  • decigram
  • centigram
  • miligram
  • microgram
  • nanogram
  • megagram
  • gigagram
  • ounce
  • pound
  • ton

Time #

  • second
  • minute
  • hour
  • day
  • week
  • month
  • year
  • decade
  • century

Time #

  • kelvin
  • celsius
  • fahrenheit
  • reaumur

Electric Current #

  • ampere
  • kiloampere
  • statampere
  • miliampere

Luminous Intensity #

  • candela (international),
  • candela (German)
  • candela (UK)

Amount of Substance #

  • mole
  • kilomole
  • milimole
  • pound mole
0
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart library for converting between two unit of base quantities.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on base_converter