UriTemplate class

An implementation of RFC 6570 URI Templates.

A URI Template is a string describing a range of URIs that can be created through variable expansion.

URI Templates provide a number of different ways that variables can be expanded into parts of a URI, suitable for usage as multi-segment paths, path segments, query strings, fragment identifiers and more.

Examples:

See the RFC for more details.

Constructors

UriTemplate(String template)

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
template String
final

Methods

expand(Map<String, Object?> variables) String
Expands the template into a URI according to the rules specified in RFC 6570. Throws a ParseException if the template is invalid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override