RouteSpecification constructor Null safety

RouteSpecification(
  1. String patternString
)

Creates a RouteSpecification from a String.

The patternString must be stripped of any optionals.

Implementation

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