Creates a new Uri
object by parsing a URI string.
If start
and end
are provided, only the substring from start
to end
is parsed as a URI.
Returns null
if the string is not valid as a URI or URI reference.
static Uri tryParse(String uri, [int start = 0, int end]) { // TODO: Optimize to avoid throwing-and-recatching. try { return parse(uri, start, end); } on FormatException { return null; } }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Uri/tryParse.html