handle method Null safety

  1. @override
FutureOr<RequestOrResponse> handle(
  1. Request request
)
override

The primary request handling method of this object.

Subclasses implement this method to provide their request handling logic.

If this method returns a Response, it will be sent as the response for request linked controllers will not handle it.

If this method returns request, the linked controller handles the request.

If this method returns null, request is not passed to any other controller and is not responded to. You must respond to request through Request.raw.

Implementation

@override
FutureOr<RequestOrResponse> handle(Request request) {
  throw StateError("Router invoked handle. This is a bug.");
}