Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Latest commit

 

History

History
28 lines (18 loc) · 969 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 969 Bytes

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!