From language code it's easy:
var format = NumberFormat.simpleCurrency(locale: "es");
print(format.currencySymbol);
But the only thing I have is EUR for euro, so the currency code
From language code it's easy:
var format = NumberFormat.simpleCurrency(locale: "es");
print(format.currencySymbol);
But the only thing I have is EUR for euro, so the currency code
var format = NumberFormat.simpleCurrency(locale: _language); <-- doesn't really what matter what language you pass
print(format.simpleCurrencySymbol("EUR"));
intl package does the trick
import 'package:intl/intl.dart';
void currency() {
Locale locale = Localizations.localeOf(context);
var format = NumberFormat.simpleCurrency(locale: locale.toString());
print("CURRENCY SYMBOL ${format.currencySymbol}"); // $
print("CURRENCY NAME ${format.currencyName}"); // USD
}