ArisCountryCodeItem.fromCode constructor

ArisCountryCodeItem.fromCode(
  1. String isoCode
)

Implementation

factory ArisCountryCodeItem.fromCode(String isoCode) {
  final Map<String, String> jsonCode = codes.firstWhere(
    (item) => item['code'] == isoCode,
    orElse: () => null,
  );

  if (jsonCode == null) {
    return null;
  }
  return ArisCountryCodeItem.fromJson(jsonCode);
}