measures 1.0.0 copy "measures: ^1.0.0" to clipboard
measures: ^1.0.0 copied to clipboard

A package intended to help developers improve readability and unambiguity of code, while dealing with commonly used units of measure.

measures #

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

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

About #

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.

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

5
likes
150
pub points
31%
popularity

Publisher

unverified uploader

A package intended to help developers improve readability and unambiguity of code, while dealing with commonly used units of measure.

Repository

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on measures