pathVariables property Null safety

Map<String, String> pathVariables

Parameters parsed from the URI of the request, if any exist.

These values are attached by a Router instance that precedes this Controller. Is null if no Router preceded the controller and is the empty map if there are no values. The keys are the case-sensitive name of the path variables as defined by Router.route.


Map<String, String> get pathVariables => request!.path!.variables;