parse static method

Uri? parse(
  1. String? url
)

Parses a URL and returns Uri object

Example:

UrlUtils.parse('https://example.com/path?query=value');

Implementation

static Uri? parse(String? url) {
  if (url == null || url.isEmpty) return null;
  try {
    return Uri.parse(url);
  } catch (_) {
    return null;
  }
}