Router constructor

Router({
  1. Handler notFoundHandler = _defaultNotFound,
})

Creates a new Router routing requests to handlers.

The notFoundHandler will be invoked for requests where no matching route was found. By default, a simple Response.notFound will be used instead.

Implementation

Router({Handler notFoundHandler = _defaultNotFound})
    : _notFoundHandler = notFoundHandler;