getLocationWithCode method

DocumentCountry? getLocationWithCode(
  1. String code
)

Implementation

DocumentCountry? getLocationWithCode(String code) {
  if (country.any((a) => a.code3 == code)) {
    return country.firstWhere((a) => a.code3 == code);
  } else {
    return null;
  }
}