This commit is contained in:
Ashita Prasad
2024-11-03 04:55:23 +05:30
2 changed files with 10 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ String stripUrlParams(String url) {
if (url == null || url == "") {
return (null, "URL is missing!");
}
if (kLocalhostRegex.hasMatch(url)) {
url = '${SupportedUriSchemes.http.name}://$url';
}
Uri? uri = Uri.tryParse(url);
if (uri == null) {
return (null, "Check URL (malformed)");