parse
Create an URI from a string, e.g. http://www.example.com/some/path
, file:///usr/home
, or scheme:with/path
.
Note that for a while uris without a scheme
were accepted. That is not correct as all uris should have a scheme. To avoid breakage of existing code the optional strict
-argument has been added. We strongly advise to use it, e.g. Uri.parse('my:uri', true)
Parameters
value
The string value of an Uri.
strict
Throw an error when value
is empty or when no scheme
can be parsed.