unhandledRequestController property

void unhandledRequestController= (Future listener(Request req))

How this router handles Requests that don't match its routes.

If a Request has no matching route, this function will be called. By default, this function will respond to the incoming Request with a 404 response, and does not forward or allow consumption of the Request for later controllers.


set unhandledRequestController(Future listener(Request req)) {
  _unhandledRequestController = listener;