Find a currency

To find a Currency that either belongs to one of the Common Currencies or one that you have registered you can use the Currencies().find method.

// Find a registered currency via its code.
Currency? audCurrency = Currencies.find('AUD');
Money audCostPrice = Money.fromIntWithCurrency(899, audCurrency);

The Money parser is also able to automatically find a currency if the currency code is a Common Currency or one you have registered.

Last updated