decimalDigits
test('parse with Currency', () {
final aud = Currency.create('AUD', 2);
expect(aud.decimalDigits, equals(2));
});Parsing
test('parsing', () {
final aud = Currency.create('AUD', 2);
final one = aud.parse(r'$1.12345');
expect(one.minorUnits.toInt(), equals(112));
});Formatting
Customising the number of Decimal Digits
Last updated
Was this helpful?