i have a product and its price is 100,000,000, but the sever returns me 100000000, so I used NumberFormat to convert it to the format I wanted, and here is the code i do but it is giving error, can someone point out what i'm doing wrong
final oCcy = NumberFormat("#,###", "en_US");
=> oCcy.format(100000000)
CodePudding user response:
I am sharing my code it will surely work :
final oCcy = NumberFormat.currency(
locale: 'eu',
customPattern: '#,### \u00a4',
symbol: 'FCFA',
decimalDigits: 2);
print(oCcy.format(12345)) // 12.345,00 FCFA