big_decimal_intl 1.0.1
big_decimal_intl: ^1.0.1 copied to clipboard
Parsing and formatting of big decimal numbers.
Big Decimal Intl #
This package allows using NumberFormat of the intl package together with BigDecimal numbers.
Usage #
First define a number format wrapped inside a BigDecimalFormatter object:
final formatter = BigDecimalFormatter(NumberFormat.decimalPattern());
To format a number into at String us the format method:
final formatted = formatter.format(BigDecimal.parse('1.5'));
To parse a number from a String use the parse method:
final bigDecimal = formatter.parse('1.5');
Additional information #
This package is a port of the intl part of dart-decimal for BigDecimal.