unities_helper 1.0.1
unities_helper: ^1.0.1 copied to clipboard
A library to help you convert unities and a few other things
A library to help Dart developers to convert unities and a few other things.
Usage #
A simple usage example:
import 'package:unities_helper/unities_helper.dart';
main() {
final temperature = convert<Temperature>(
Temperature.celcius, // from
Temperature.fahrenheit, // to
25, // value
); /// Convert 25°C into Fahrenheit
print(temperature);
}
A more detailed example can be found on the example folder
Supported conversions: #
- Area: square kilometre, square metre square mile, square yard, square foot, square inch, hectare and acre
- Binary (Not full support yet): text to binary and binary to text
- Color codes: HEX, HSV, HSLA, RGBA
- Data trasnfer rate: bit, kilobit, kilobyte, kibibit, megabit, megabyte, mebibit, gigabit, gigabyte, gibibit, terabit, terabyte and tebibit
- Energy: joule, kilojoule, gram calorie, kilocalorie, watt-hour, kilowatt-hour, electron-volt, british thermal unit, therm (US) and foot-pound
- Frequency: hertz, kilohertz, megahertz and gigahertz
- Fuel economy: kilometer per litre, liter per 100 kilometres, mile per US gallon and mile per imperial gallon
- Hexadecimal (Not full support yet): text to hex and hex to text
- Keyboard conversion (Not implemented yet): latin, hangul / hanja (korean), kanji / hiragana / katakana / romaji (japanese), chinese...
- Length: nanometer, micrometer, millimeter, centimeter, meter, kilometer, inch, mile, yard, feet and nautical mile
- tonne, gram, kilogram, milligram, microgram, imperial ton, us ton, stone, pound and ounce
- Plane angle: degree, gradian, milliradian, radian, minute of arc and second of arc
- Pressure: bar, pascal, torr, pound-force per square inch and standart atmosphere
- miles per hour, foot per second, metre per second, kilometre per hour and knot
- Temperature: celcius, fahrenheit, kelvin
- Time: nanosecond, microsecond, millisecond, second, minute, hour, day, week, month, calendar year, decade and century
- Volume: usLiquidGallon, usLiquidQuart, usLiquidPint, usLegalCup, usFluidOunce, usTablespoon, usTeaspoon, cubicMetre, litre, millilitre, gallon, imperialQuart, imperialPint, imperialCup, fluidOunce, imperialTablespoon, imperialTeaspoon, cubicFoot, cubicInch,
Features and bugs #
Please file feature requests and bugs at the issue tracker.