fromCode static method
Get currency from its code
Implementation
static Currency? fromCode(String code) {
try {
return Currency.values.firstWhere(
(currency) => currency.code.toUpperCase() == code.toUpperCase(),
);
} catch (_) {
return null;
}
}