findByCode method
Returns the first currency that mach the given code.
Implementation
Currency? findByCode(String? code) {
final uppercaseCode = code?.toUpperCase();
return _currencies
.firstWhereOrNull((currency) => currency.code == uppercaseCode);
}