operator [] method

Currency? operator [](
  1. String isoCode
)

Short hand method to find a currency based on its isoCode. Throw UnknownCurrencyException if the isoCode hasn't been registered and is not one of the CommonCurrencies.

final usd = Currencies()['USD'];

Implementation

Currency? operator [](String isoCode) => find(isoCode);