generatePhoneNumber method

String generatePhoneNumber(
  1. PhoneNumber phone,
  2. bool isChineseMainland
)

Generate phone number.

Implementation

String generatePhoneNumber(PhoneNumber phone, bool isChineseMainland) {
  if (isChineseMainland) {
    return phone.nationalNumber;
  } else {
    return '+${phone.countryCode}${phone.nationalNumber}';
  }
}