getSelected method
- String? code
Implementation
Currency getSelected(String? code) {
if (code != null) {
for (final Currency currency in Currency.values) {
if (currency.name == code) {
return currency;
}
}
}
return Currency.values.first;
}