toPhoneNumber method

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

Implementation

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