encode static method

String encode(
  1. String url
)

Encodes a URL

Example:

UrlUtils.encode('hello world'); // 'hello%20world'

Implementation

static String encode(String url) {
  return Uri.encodeComponent(url);
}