fromSymbol static method
CurrencyFormat?
fromSymbol(
- String symbol, [
- List<
CurrencyFormat> currencies = CurrencyFormatter.majorsList
Get the CurrencyFormat of a currency using its symbol.
Implementation
static CurrencyFormat? fromSymbol(
String symbol, [
List<CurrencyFormat> currencies = CurrencyFormatter.majorsList,
]) {
if (currencies.any((c) => c.symbol == symbol)) {
return currencies.firstWhere((c) => c.symbol == symbol);
}
return null;
}