chooseRightOrderOnCurrencySymbol static method
returns a formatted acount with currency code with given priceFormat
Implementation
static String chooseRightOrderOnCurrencySymbol(
dynamic amount,
String currencyCode, {
NumberFormat? priceFormat,
String? locale,
}) {
// Fall back to the ISO code when the symbol is unknown. Interpolating the
// lookup directly rendered the literal string "null" as the symbol for any
// currency missing from the map.
final symbol = _simpleCurrencySymbols[currencyCode] ?? currencyCode;
return NumberFormat.currency(
name: currencyCode,
symbol: symbol,
locale: locale,
).format(amountFromJson(amount));
}