If you happened to provide a query or label that included certain
syntactically meaningful URL characters like '#' or '&', the resulting URL
would be broken as those characters would appear in the raw and not be
escaped.
This is because Uri.encodeFull is a terrible function that should be
abolished. It lures people into thinking that you can put arbitrary strings
into URL segments & parameters and have Uri.encodeFull automagically escape
them for you while keeping the rest of the URL syntax intact. Alas, this is
not the case as it won't -- and can't -- escape characters that are
syntactically meaningful in URLs like '/', '#', '?', etc. The result is that
some characters get escaped but not others and any query parameter that
happens to include them will break the URL.
A more effective solution is to create a proper Uri from the components and
then stringify it using toString().
If you happened to provide a query or label that included certain syntactically meaningful URL characters like '#' or '&', the resulting URL would be broken as those characters would appear in the raw and not be escaped.
This is because Uri.encodeFull is a terrible function that should be abolished. It lures people into thinking that you can put arbitrary strings into URL segments & parameters and have Uri.encodeFull automagically escape them for you while keeping the rest of the URL syntax intact. Alas, this is not the case as it won't -- and can't -- escape characters that are syntactically meaningful in URLs like '/', '#', '?', etc. The result is that some characters get escaped but not others and any query parameter that happens to include them will break the URL.
A more effective solution is to create a proper Uri from the components and then stringify it using toString().