Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[shelf_router_generator]How to customize the notFoundHandler of router when using shelf_router_generator #382

Open
JDongKhan opened this issue Sep 28, 2023 · 0 comments

Comments

@JDongKhan
Copy link

// 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.

@JDongKhan JDongKhan changed the title How to customize the notFoundHandler of router when generating when using shelf_router_generator [shelf_router_generator]How to customize the notFoundHandler of router when generating when using shelf_router_generator Sep 28, 2023
@JDongKhan JDongKhan changed the title [shelf_router_generator]How to customize the notFoundHandler of router when generating when using shelf_router_generator [shelf_router_generator]How to customize the notFoundHandler of router when using shelf_router_generator Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant