updateCurrency static method

void updateCurrency(
  1. String code,
  2. CurrencyInfo currency
)

Update an existing currency

Implementation

static void updateCurrency(String code, CurrencyInfo currency) {
  _initializeDefaultCurrencies();
  final upperCode = code.toUpperCase();
  if (!_currencies.containsKey(upperCode)) {
    throw ArgumentError('Currency "$code" not found');
  }
  _currencies[upperCode] = currency;
}