Route.resource constructor

Route.resource(
  1. Resource resource, {
  2. List<ModularMiddleware> middlewares = const [],
})

Implementation

factory Route.resource(
  Resource resource, {
  List<ModularMiddleware> middlewares = const [],
}) {
  return Route._(
    name: '/',
    children: resource.routes,
    middlewares: middlewares,
  );
}