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?

Symbols

A number of currency have different symbols, you can specify the symbol when creating the currency.

The Common Currencies have the appropriate symbol configured for each currency.

void main() {
   test('Symbols', () {
      // Create a currency for Japan's yen with the correct symbol
      final jpy = Currency.create('JPY', 0, symbol: '¥');
      expect(jpy.symbol, equals('¥'));
      final euro = Currency.create('EUR', 2, symbol: '€');
      expect(euro.symbol, equals('€'));
    });
}
PreviousDefault formatNextSeparators

Last updated 29 days ago

Was this helpful?