# UriTemplate class

A utility class for defining and working with URI templates that include path variables (e.g., `/users/{id}/orders/{orderId}`).

This class supports matching incoming paths against templates, extracting variable values, and expanding templates into full URIs given a variable map.

### 🧰 Usage:

    final template = UriTemplate('/users/{id}/orders/{orderId}');

    final match = template.match('/users/42/orders/99');
    print(match); // {id: 42, orderId: 99}

    final expanded = template.expand({'id': '42', 'orderId': '99'});
    print(expanded); // /users/42/orders/99

Use this class when you need structured path parsing in routers, dynamic endpoint generation, or URL normalization logic.

## Constructors

UriTemplate.new(String template)
  A utility class for defining and working with URI templates that include path variables (e.g., `/users/{id}/orders/{orderId}`).

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
template → String
  The raw URI template string.
  final

## Methods

expand(Map<String, String> variables) → String
  Replaces all variable placeholders in the template with actual values provided in the `variables` map.
match(String path) → Map<String, String>?
  Matches a path string against the URI template and extracts values for declared path variables.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  A string representation of this object.
  inherited

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited

## Static Methods

matches(String first, String second) → bool
  Matches two urls to each other
normalize(String url) → String
  Produces a normalized version of a full URL string by applying various standardizations:
normalizePath(String path) → String
  Normalizes a raw path by: