primaryCurrency property

Currency? get primaryCurrency

Returns the primary currency (first in the list) or null if none exist.

This is useful when you need a single currency to represent the country, typically the main or most commonly used currency.

Implementation

Currency? get primaryCurrency =>
    currencies.isNotEmpty ? currencies.first : null;