handle method
Регистрация обработчика
Implementation
void handle({
required Method method,
required Handler handler,
}) {
// assert(handler.path != null && handler.rPath == null);
// assert(handler.rPath != null && handler.path == null);
if (_routes[method] == null) {
_routes[method] = <String, Handler>{};
}
_routes[method]!.update(
'${method.toString().split('.')[1]} ${handler.path ?? handler.rPath}',
(Handler value) => handler,
ifAbsent: () => handler,
);
}