Based on the user-locale I show decimals, for example: 1234.567 will be in:
- US: 1,234.567
- NL: 1.234,567
Therefor I use:
NumberFormat.decimalPattern(locale.toString()).format(1234.567)
That works fine :)
But now I want to set the max-digets. There is a maximumFractionDigits, but how to apply this one?
This one doesn't work: NumberFormat.decimalPattern(locale.toString(), maximumFractionDigits: 2).format(1234.567)
On the currency it works like this: NumberFormat.currency(locale: locale.toString(), decimalDigits: 3).format(1234567)