money2
  • Overview
  • Common Currencies
  • Creating a Currency
  • Registering a Currency
  • Parsing
  • Find a currency
  • Default format
  • Symbols
  • Separators
    • Decimal Separator
    • Group Separator
  • Creating Money
    • Money.parse
    • Currency.parse
    • Money.from
    • Currencies.parse
    • decimalDigits
  • Formatting
    • Formatting Patterns
  • Storing and Send
  • Exchange Rates
  • Comparison
  • Currency Predicates
  • Value Sign Predicates
  • Arithmetic Operations
  • Allocation
  • Money encoding/decoding
Powered by GitBook
On this page

Was this helpful?

Find a currency

PreviousParsingNextDefault format

Last updated 29 days ago

Was this helpful?

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

    test('Find a currency', () {
      // Find a registered currency via its code.
      final audCurrency = Currencies().find('AUD');
      final audCostPrice = Money.fromIntWithCurrency(899, audCurrency!);
      expect(audCostPrice.currency.isoCode, equals('AUD'));
    });

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

Common Currencies
registered