WebRoute constructor

WebRoute({
  1. required String path,
  2. required WebRequest rq,
  3. List<String> extraPath = const [],
  4. List<String> methods = const [RequestMethods.GET],
  5. WaController? controller,
  6. String widget = "",
  7. Future<String> index()?,
  8. WaAuthController? auth,
  9. List<WebRoute> children = const [],
  10. Map<String, Object?> params = const {},
  11. String title = '',
  12. List<String> excludePaths = const [],
  13. Future<ApiDoc>? apiDoc()?,
  14. List<String> permissions = const [],
  15. List<String> hosts = const ['*'],
  16. List<int> ports = const [],
})

Creates a WebRoute instance with the specified parameters.

path and rq are required parameters. All other parameters have default values.

Implementation

WebRoute({
  required this.path,
  required this.rq,
  this.extraPath = const [],
  this.methods = const [RequestMethods.GET],
  this.controller,
  this.widget = "",
  this.index,
  this.auth,
  this.children = const [],
  this.params = const {},
  this.title = '',
  this.excludePaths = const [],
  this.apiDoc,
  this.permissions = const [],
  this.hosts = const ['*'],
  this.ports = const [],
}) : super();