findMetadataForCountryCode static method
Implementation
static Map<String, dynamic>? findMetadataForCountryCode(
String countryCode,
String nationalNumber,
) {
final isoList = countryCodeToIsoCode(countryCode);
if (isoList.isEmpty) {
return null;
}
// country code can have multiple metadata because multiple iso code
// share the same country code.
final allMatchingMetadata =
isoList.map((iso) => findMetadataForIsoCode(iso)).toList();
final match = _getMatchUsingPatterns(nationalNumber, allMatchingMetadata);
return match;
}