Closed rmpt closed 6 months ago
import 'package:intl/intl.dart';
void main() {
var formatter = NumberFormat.currency(
locale: 'pt_PT',
decimalDigits: 2
);
print(formatter.format(3));
}
does print 3,00 EUR
. The locale pt
means pt_BR
, so it will not print EUR
.
it does not print 3,00 EUR, it prints BRL, I've mentioned it var formatter = NumberFormat.currency(locale: 'pt'); // or pt_PT and eu
The result is always BRL
Interesting. What does running https://dartpad.dev/?id=33450ca181a781f5e1909144c7aa834f print for you?
In fact, from your example I see EUR. I've tried again and now it works. I'm not sure what was wrong, thanks anyway
Describe the bug pt currency should be formatted as EUR and not BRL.
Based on the example at https://api.flutter.dev/flutter/intl/NumberFormat/locale.html, create a NumberFormat with:
BRL 3
but should beEUR 3
To Reproduce Add a minimal working example or, if not possible or available, any code which might help to reproduce the problem