apply method

void apply([
  1. dynamic path
])

Apply the defined routes in this router to the current execution stack

Implementation

void apply([path]) {
  String basePath = path is String ? path : _basePath;

  for (var route in _routes) {
    _app.addRoute(Route(
      method: route.method,
      path: combinePath(basePath, route.path),
      middleware: route.middleware,
      callback: route.callback,
    ));
  }
}