Uri.https constructor Null safety

  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.


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


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