Uri.https constructor Null safety

Uri.https(
  1. String authority,
  2. String unencodedPath,
  3. [Map<String, dynamic>? queryParameters]
)

Creates a new https URI from authority, path and query.

This constructor is the same as Uri.http except for the scheme which is set to https.

Example:

var uri = Uri.https('example.org', '/path', {'q': 'dart'});
print(uri); // https://example.org/path?q=dart

uri = Uri.https('user:password@localhost:8080', '');
print(uri); // https://user:password@localhost:8080

uri = Uri.https('example.org', 'a b');
print(uri); // https://example.org/a%20b

uri = Uri.https('example.org', '/a%2F');
print(uri); // https://example.org/a%252F

Implementation

factory Uri.https(String authority, String unencodedPath,
    [Map<String, dynamic>? queryParameters]) = _Uri.https;