isUrl property
bool
get
isUrl
验证是否url地址
Implementation
bool get isUrl {
if (this.isEmptyString) {
return false;
}
var regex =
RegExp(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', caseSensitive: false);
return regex.hasMatch(this!);
}