isURL method
Returns whether this string is a URL or not.
Returns true
for a URL.
この文字列がURLかどうかを返します。
URLの場合true
を返します。
Implementation
bool isURL() {
return RegExp(r'https?://[a-zA-Z0-9\-%_/=&?.]+').hasMatch(this);
}
Returns whether this string is a URL or not.
Returns true
for a URL.
この文字列がURLかどうかを返します。
URLの場合true
を返します。
bool isURL() {
return RegExp(r'https?://[a-zA-Z0-9\-%_/=&?.]+').hasMatch(this);
}