FunctionalRouteDefinition.middleware constructor

FunctionalRouteDefinition.middleware(
  1. String path,
  2. Middleware handler
)

Implementation

FunctionalRouteDefinition.middleware(this.path, Middleware handler)
    : _requestHandler = null,
      _middleware = handler,
      method = HTTPMethod.ALL,
      super(RouteDefinitionType.middleware) {
  route = RouteMapping([method], path);
}