findByName method

Currency? findByName(
  1. String? name
)

Returns the first currency that mach the given name.

Implementation

Currency? findByName(String? name) {
  return _currencies.firstWhereOrNull((currency) => currency.name == name);
}