setUpPathParams method

void setUpPathParams(
  1. String template
)

The path params need to be initialized with a template For the url: /user/adam/details

A possible template could be: /user/{name}/details

With this set-up the path params will be: {id: 1234}

But the same url (/user/adam/details), with the template: /user/adam/{action}

Will give the params: {action: details}

Or with the template: /user/{name}/{action}

Will give the params: {name: adam, action: details}

Basically at the time of the request is first made, this template is not available, only after the route is selected with the template o is manually configured, only after this the path params are configured, any other case the params will be an empty map

Implementation

void setUpPathParams(String template) {
  _pathTemplate = template;
  _pathParams = _extractPathParams(
    template,
    requestedUri.toString(),
  );
}