Tries to parse a string as a URI.
static Uri? tryParse(String? url) { if (url == null || url.isEmpty) return null; return Uri.tryParse(url); }