I would like to show the user the currency symbol of their current locale. The locale and currency symbol can easily be retrieved with:
import 'package:intl/intl.dart';
var localeString = Localizations.localeOf(context).toString();
var _currencySymbol = NumberFormat.simpleCurrency(locale: localeString).currencySymbol;
The problem is that to retrieve the user's currency symbol the app has to support the user's locale. For eg. if you would like to show a user in South Africa a currency in South African Rands the Locale('en', 'ZA') has to be added to the current supported locales.
Adding support for all countries' locales in the supported locales list:
supportedLocales: [
const Locale('en', 'US'), // USD
const Locale('en', 'ZA'), // ZAR
const Locale('en', 'AU'), // AUD
//..... All other locales
],
does not seem feasible and won't have support for new countries being added to the flutter intl list. Is there an easier/better way to add support for all countries' locales or to display all locales' currency symbols?