Phone number formatting does not comply with libphonenumber specification
As is documented here, to prevent data deduplication, format rules are not copied to all NANPA countries, and the mainCountryForCode attribute is set for countries that share the same calling code.
I am willing to submit a PR that fixes this. From my understanding of the code, my two choices would be to duplicate the formats in metadata_formats_by_iso_code.dart, but increasing the file by ~1200 lines, or refactor PhoneMetadataFormat so that it can either refer to another IsoCode or contain a list of PhoneMetadatFormat.
I prefer the second approach, but I ignore if the generated files have to remain stable or if they can be changed.
Let me know!
Hello @fpbouchard Thanks for the detailed issue and research. I'm with you for the second approach. Since the metadata is currently public, this would still need a major semver upgrade.