route method
NestedRoute
route(
- String path, {
- List<
FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const [],
Creates one or multiple route segments that can be used as a common base for specifying routes with get, post, etc.
You can define middleware that effects all sub-routes.
Implementation
NestedRoute route(String path, {List<FutureOr Function(HttpRequest req, HttpResponse res)> middleware = const []}) => NestedRoute(server_universe: this, basePath: path, baseMiddleware: middleware);