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

Money and Currency library for Dart.

example/example.dart

// example.dart
// Money Copyright © 2021; Electric Bolt Limited.

import 'package:moneycurrency/moneycurrency.dart';

void main() {
  var NZD = CurrencyManager().get('NZD')!;
  var amount1 = Money.string('4.51', NZD);
  var amount2 = Money.string('1020.04', NZD);
  var total = amount1 + amount2; // 1024.55

  // prints '$1,024.55'
  print(total.toString(symbols: true, grouping: true));

  // prints 'one thousand and twenty four dollars and fifty five cents'
  print(total.accessibilityText());
}
3
likes
110
pub points
53%
popularity

Publisher

verified publisherelectricbolt.co.nz

Money and Currency library for Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

decimal

More

Packages that depend on moneycurrency