UriParsingX extension

Extension methods for validating and converting URI-like strings.

Used internally by Convert.toUri for smart URI coercion. These methods detect phone numbers and email addresses and wrap them in appropriate URI schemes (tel:, mailto:).

See also: UriOptions for configuring URI parsing behavior.

on

Properties

isEmailAddress bool

Available on String, provided by the UriParsingX extension

Returns true if this string appears to be an email address.
no setter
isValidPhoneNumber bool

Available on String, provided by the UriParsingX extension

Returns true if this string resembles a telephone number.
no setter
toMailUri Uri

Available on String, provided by the UriParsingX extension

Converts this email string into a mailto: URI.
no setter
toPhoneUri Uri

Available on String, provided by the UriParsingX extension

Converts this phone number string into a tel: URI.
no setter
toUri Uri

Available on String, provided by the UriParsingX extension

Parses this string into a Uri using Uri.parse.
no setter