measures 0.2.2
measures: ^0.2.2 copied to clipboard

A package intended to help developers manage routine conversions between commonly used units of measure, and improve readability and unambiguity of code.

measures #

Pub Version Pub Likes Pub points Pub popularity License Dart Platform Flutter Platform

The package intended to help developers comfortably handle routine operations with commonly used units of measure, provide seamless units conversions and to improve readability and unambiguity of code.

About #

A simple but useful package that won't let you be confused with what exactly unit are you using in a particular place and get the necessary one in easy way.

Currently supported features #

At the moment following measure types are supported:

  • Acceleration;
  • Altitude;
  • Angle;
  • Azimuth;
  • Density;
  • Distance;
  • Mass;
  • Pressure;
  • Speed;
  • Temperature;
  • Time.

Overview #

Usage #

Basic use case #

Use corresponding constructor to pass a value in origin units, and then get it in units you need when you need. For example:

import 'package:measures/measures.dart';

main() {
  var dist = Distance.fromNm(10); // Set the value 10 nautical miles
  print(dist.km); // Get the value in kilometres: 18.52 km
  print(dist.m); // Get the value in metres: 18520.0 m
}

Installation #

Add measures to your pubspec.yaml file:

dependencies:
  measures: ^0.2.2

Changelog #

All notable changes to this project will be documented in this file.

Issues #

For issues, file directly in the measures repo.

License #

The 3-Clause BSD License

3
likes
130
pub points
51%
popularity

A package intended to help developers manage routine conversions between commonly used units of measure, and improve readability and unambiguity of code.

Repository

Documentation

API reference

License

BSD (LICENSE)

More

Packages that depend on measures