isMobileNumberPortableRegion method

bool isMobileNumberPortableRegion(
  1. String? regionCode
)

Returns true if the supplied region supports mobile number portability. Returns false for invalid, unknown or regions that don't support mobile number portability.

regionCode the region for which we want to know whether it supports mobile number portability or not

Implementation

bool isMobileNumberPortableRegion(String? regionCode) {
  PhoneMetadata? metadata = getMetadataForRegion(regionCode: regionCode);
  if (metadata == null) {
    return false;
  }
  return metadata.mobileNumberPortableRegion;
}