I am rendering a node in Flutter app something like:
We have total ${_summary[\'bookCount\']} books.
_summ
An update for above answers:
First add intl package into your pubspec.yaml file, just after flutter sdk (like below):
dependencies:
flutter:
sdk: flutter
intl: ^0.16.0
If you use flutter_localizations, intl must be above of that.
Now you can use NumberFormat class.
Some examples:
print(NumberFormat.currency().format(123456)); // USD123,456.00
print(NumberFormat.currency(locale: 'eu').format(123456)); // 123.456,00 EUR
print(NumberFormat.currency(name: 'EURO').format(123456)); // EURO123,456.00
print(NumberFormat.currency(locale: 'eu', symbol: '?').format(123456)); // 123.456,00 ?
print(NumberFormat.currency(locale: 'eu', decimalDigits: 3).format(123456)); // 123.456,000 EUR
print(NumberFormat.currency(locale: 'eu', customPattern: '\u00a4 #,##.#').format(123456)); // EUR 12.34.56,00
Refrence & More information: https://www.woolha.com/tutorials/dart-formatting-currency-with-numberformat#supported-locales
NumberFormat Class Dart API: https://api.flutter.dev/flutter/intl/NumberFormat-class.html