toPhoneNumber method

String toPhoneNumber({
  1. InvalidPhoneAction invalidPhoneAction = InvalidPhoneAction.ShowUnformatted,
  2. bool allowEndlessPhone = false,
  3. String? defaultMask,
  4. String? defaultCountryCode,
})

Implementation

String toPhoneNumber({
  InvalidPhoneAction invalidPhoneAction = InvalidPhoneAction.ShowUnformatted,
  bool allowEndlessPhone = false,
  String? defaultMask,
  String? defaultCountryCode,
}) {
  return formatAsPhoneNumber(
        this,
        allowEndlessPhone: allowEndlessPhone,
        defaultCountryCode: defaultCountryCode,
        defaultMask: defaultMask,
        invalidPhoneAction: invalidPhoneAction,
      ) ??
      this;
}