findByName method

Country? findByName(
  1. String? name
)

Returns the first country that mach the given name.

Implementation

Country? findByName(String? name) {
  return _countries.firstWhereOrNull((country) => country.name == name);
}