addRoute method Null safety

Route addRoute(
  1. Route route
)
override

Adds a route to the muxer

Implementation

Route addRoute(Route route) {
  final route1 = route.cloneWith(
    info: route.info.cloneWith(path: path + route.info.path),
    before: [...before, ...route.getBefore()],
    after: [...after, ...route.getAfter()],
    onException: [...onException, ...route.getOnException()],
  );
  parent.addRoute(route1);
  return route1;
}