encodeFull method Null safety

String encodeFull(
  1. String uri

Encodes the string uri using percent-encoding to make it safe for literal use as a full URI.

All characters except uppercase and lowercase letters, digits and the characters !#$&'()*+,-./:;=?@_~ are percent-encoded. This is the set of characters specified in in ECMA-262 version 5.1 for the encodeURI function.


final encoded =
    Uri.encodeFull('https://example.com/api/query?search= dart is');
print(encoded); // https://example.com/api/query?search=%20dart%20is


static String encodeFull(String uri) {
  return _Uri._uriEncode(_Uri._encodeFullTable, uri, utf8, false);