Route.resource constructor

Route.resource(
  1. String name, {
  2. required Resource resource,
  3. List<Middleware> middlewares = const [],
})

Implementation

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