countryCodeListFromJson function

List<CountryCode> countryCodeListFromJson(
  1. List? countryCode, [
  2. List<CountryCode>? defaultValue
])

Implementation

List<enums.CountryCode> countryCodeListFromJson(
  List? countryCode, [
  List<enums.CountryCode>? defaultValue,
]) {
  if (countryCode == null) {
    return defaultValue ?? [];
  }

  return countryCode.map((e) => countryCodeFromJson(e.toString())).toList();
}