fromCountryCode method Null safety

PhoneNumber fromCountryCode(
  1. String countryCode,
  2. String phoneNumber
)

Parses a phoneNumber given a countryCode

Use fromIsoCode when possible as multiple countries use the same country calling code.

If you know the phoneNumber is a national number, prefer fromNational.

The phoneNumber can be of the sort: +33 6 86 57 90 14, 06 86 57 90 14, 6 86 57 90 14

throws a PhoneNumberException if the country calling code is invalid

alias for PhoneParser.fromCountryCode

Implementation

static PhoneNumber fromCountryCode(
  String countryCode,
  String phoneNumber,
) =>
    PhoneParser.fromCountryCode(countryCode, phoneNumber);