isUrl property
bool
get
isUrl
判断字符串是否为URL
Implementation
bool get isUrl {
return RegExp(
r'^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$')
.hasMatch(this);
}