add method Null safety
- String httpMethod,
- String pathRoute,
- DartnessRouterHandler routerHandler
override
Add a routerHandler
to the _router
and handles the request by
the httpMethod
for the pathRoute
.
Implementation
@override
void add(
final String httpMethod,
final String pathRoute,
final DartnessRouterHandler routerHandler,
) {
final Function handler = (final Request request,
[final Object? extras]) async =>
await routerHandler.handleRoute(request, extras);
_router.add(httpMethod, pathRoute, handler);
}