quantities 0.1.2 copy "quantities: ^0.1.2" to clipboard
quantities: ^0.1.2 copied to clipboard

discontinued
outdated

Physical quantities and units.

A Dart package that helps you work with physical quantities and units seamlessly.

Created from templates made available by Stagehand under a BSD-style license.

Installation #

See installation instructions here.

API Status #

The API is highly experimental; large changes are planned. Do NOT use this package in production code unless you understand and accept the consequences of this.

Usage #

import 'package:quantities/quantities.dart';

void main() {
  final height = 165(centi(meter));
  final weight = 53(kilo(gram));
  final bmi = weight / (height * height);
  print('${bmi.to(kilo(gram) / squareMeter)} kg / m^2');
}

Credits #

This package takes huge inspiration from purescript-quantites, especially in its internal design. Kudos to sharkdp!

0
likes
100
pub points
0%
popularity

Publisher

unverified uploader

Physical quantities and units.

Homepage

Documentation

API reference

License

BSD-3-Clause, MIT (LICENSE)

Dependencies

collection, meta, tuple

More

Packages that depend on quantities