lookupTimeZonesForNumber method

List<String> lookupTimeZonesForNumber(
  1. PhoneNumber number
)

As per lookupTimeZonesForNumber(long), but receives the number as a PhoneNumber instead of a long.

number the phone number to look up returns the list of corresponding time zones

Implementation

List<String> lookupTimeZonesForNumber(PhoneNumber number) {
  String nationalSignificantNumber =
      PhoneNumberUtil.instance.getNationalSignificantNumber(number);
  int phonePrefix =
      int.parse('${number.countryCode}$nationalSignificantNumber');
  return _lookupTimeZonesForNumber(phonePrefix);
}