• CHANGELOG.md
• Example
• Installing
• Versions
• 29

# Units

A starting point for measurement units in Dart.

Included right now:

• Speed
• Length

## Usage #

A simple usage example:

``````    import 'package:units/units.dart';

main() {
var speed = new Speed.fromKilometerPerHour(value: 360.0);
print('360 km/h are \${speed.inMeterPerSecond} m/s');
print('360 km/h are \${speed.inMeterPerSecond} mi/h');
}
``````

Note: All numbers are forced to a max representation with exactly 6 significant digits.

For example: `12345678910.12345678` will turn into: `12345678910.123457`

# Changelog #

## 0.0.1 #

• Initial version

Included right now:

• Speed
• Length

## 0.0.2 #

Minor improvements to Speed and Length, also added some tests

Now, all numbers are forced to a max representation of exactly 6 significant digits For example: 12345678910.12345678 will turn into: 12345678910.123457

## 0.0.3 #

example/units_example.dart

``````import 'package:units/units.dart';

main() {
var speed = new Speed.fromKilometerPerHour(value: 360.0);
print('360 km/h are \${speed.inMeterPerSecond} m/s');
print('360 km/h are \${speed.inMeterPerSecond} mi/h');
}
``````

## Use this package as a library

### 1. Depend on it

``````
dependencies:
units: ^0.0.3

``````

### 2. Install it

You can install packages from the command line:

with pub:

``````
\$ pub get

``````

Alternatively, your editor might support `pub get`. Check the docs for your editor to learn more.

### 3. Import it

Now in your Dart code, you can use:

``````
import 'package:units/units.dart';
``````
0.0.7 Feb 10, 2018
0.0.6 Oct 15, 2017
0.0.5 Oct 14, 2017
0.0.4 Oct 13, 2017
0.0.3 Oct 13, 2017
0.0.2 Oct 13, 2017
0.0.1 Oct 12, 2017
 Popularity: Describes how popular the package is relative to other packages. [more] 57 Health: Code health derived from static analysis. [more] -- Maintenance: Reflects how tidy and up-to-date the package is. [more] -- Overall: Weighted score of the above. [more] 29

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

#### Analysis issues and suggestions

Support Dart 2 in `pubspec.yaml`.

The SDK constraint in `pubspec.yaml` doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

#### Maintenance issues and suggestions

Make sure `dartdoc` successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

#### Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0