shelf icon indicating copy to clipboard operation
shelf copied to clipboard

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

Open JDongKhan opened this issue 1 year ago • 0 comments


// 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 avatar Sep 28 '23 05:09 JDongKhan