isUrl property

bool get isUrl

Returns true if the string is a valid URL.

Implementation

bool get isUrl =>
    !isNullOrEmpty &&
        Uri.tryParse(this!)?.hasAbsolutePath == true;