unities_helper 3.0.0 icon indicating copy to clipboard operation
unities_helper: ^3.0.0 copied to clipboard

A library to help you convert unities and a few other things

example/unities_helper_example.dart

import 'package:unities_helper/unities_helper.dart';

void main() {
  final temperature = convertTemperature(
    Temperature.celcius, // from
    Temperature.fahrenheit, // to
    25, // celcius
  );

  /// Convert 25°C into Fahrenheit
  print(temperature);
  final length = convert<Length>(
    Length.centimeter, // from
    Length.meter, // to
    300, // centimeters
  );

  /// Convert 300 centimeters into meter
  print(length);

  // final mass = convertMass(Mass.kilogram, Mass.gram, 10);
  final mass = 10.asMass(Mass.kilogram).toGram;
  print(mass);
}
5
likes
120
pub points
51%
popularity

Publisher

unverified uploader

A library to help you convert unities and a few other things

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

meta

More

Packages that depend on unities_helper