RouteSpecification(String patternString)

Creates a new RouteSpecification from a String.

The patternString must be stripped of any optionals.

Source

RouteSpecification(String patternString) {
  segments = _splitPathSegments(patternString);
  variableNames =
      segments.where((e) => e.isVariable).map((e) => e.variableName).toList();
}