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

A universal money conversion and calculation library for Dart.

Cash #

A universal money conversion and calculation library for Dart.

Features #

  • Store money values in a consistent way
  • Calculate with money values
  • Convert between different currencies
  • Support for multiple currencies (≈185) with exchange rates
  • Name and symbol for each currency in around 200 languages

See currencies.md for a list of all available currencies and the supported locales.

Installation #

Install the package using:

dart pub add cash

Usage #

After installing the package, you can use it in your Dart or Flutter project:

import 'package:cash/cash.dart';

void main() {
  final money = Cash(100, Currency.usd);
  final moneyInEur = money.convertTo(Currency.eur);

  print('Converted Money: ${moneyInEur.toString()}');

  print('Double that: ${moneyInEur * 2}');
  print('Half that: ${moneyInEur / 2}');
}

For more examples, check out the example file. For API documentation, see the API docs.

1
likes
160
points
27
downloads

Publisher

verified publisherjhubi1.com

Weekly Downloads

A universal money conversion and calculation library for Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

http, retry

More

Packages that depend on cash