Router constructor Null safety

Router(
  1. {String? basePath,
  2. Future notFoundHandler(
    1. Request
    )?}
)

Creates a new Router.

Implementation

Router({String? basePath, Future Function(Request)? notFoundHandler})
    : _unmatchedController = notFoundHandler,
      _basePathSegments =
          basePath?.split("/").where((str) => str.isNotEmpty).toList() ?? [] {
  policy?.allowCredentials = false;
}