shelf
shelf copied to clipboard
[shelf_router_generator]How to customize the notFoundHandler of router when using shelf_router_generator
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'all_routes.dart';
// **************************************************************************
// ShelfRouterGenerator
// **************************************************************************
Router _$AllRoutesRouter(AllRoutes service) {
final router = Router();
router.add(
'GET',
r'/echo/<message>',
service._echo,
);
router.mount(
r'/auth',
service._auth.call,
);
router.mount(
r'/post/',
service._post.call,
);
router.mount(
r'/user/',
service._user.call,
);
router.mount(
r'/admin/',
service._admin.call,
);
router.mount(
r'/',
service._index.call,
);
return router;
}
The router is automatically generated by the script and I cannot modify its parameters.