Route.module constructor

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

Implementation

factory Route.module(String name,
    {required Module module, List<Middleware> middlewares = const []}) {
  final route = Route._(name: name, middlewares: middlewares);
  return route.addModule(name, module: module) as Route;
}