currency_type 0.0.3 copy "currency_type: ^0.0.3" to clipboard
currency_type: ^0.0.3 copied to clipboard

Currency type for Dart and Flutter, a large numeric type, with exactly four digit after the decimal point, appropriate for financial calculations.

example/main.dart

import 'package:currency_type/currency_type.dart';

void main(List<String> arguments) {
  print('');
  print('Using Currency:');

  var a = Currency.parse('0.7');
  var b = Currency.parse('0.49');
  var c = a * a;

  print('Result : $c');

  if (c == b) {
    print("Yes it's equal");
  } else {
    print("No it's not equal");
  }

  print('');
  print('Using Float');

  var aa = 0.7;
  var bb = 0.49;
  var cc = aa * aa;
  var dd = (cc == 0.49);

  print('Result : $cc');

  if (cc == bb) {
    print("Yes it's equal");
  } else {
    print("No it's not equal");
  }
}
25
likes
150
pub points
0%
popularity

Publisher

verified publishertantowi.com

Currency type for Dart and Flutter, a large numeric type, with exactly four digit after the decimal point, appropriate for financial calculations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on currency_type