Route.module constructor

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

Implementation

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