regexValidPhoneNumber top-level constant
String
const regexValidPhoneNumber
Matches common phone number formats with optional country codes and extensions.
Implementation
const String regexValidPhoneNumber =
r'(\+\d{1,3}\s?)?((\(\d{3}\)\s?)|(\d{3})(\s|-?))(\d{3}(\s|-?))(\d{4})(\s?(([E|e]xt[:|.|]?)|x|X)(\s?\d+))?';