copyWith method

  1. @override
Route copyWith({
  1. Handler? handler,
  2. String? name,
  3. String? schema,
  4. Module? module,
  5. List<Middleware>? middlewares,
  6. List<ModularRoute>? children,
  7. String? parent,
  8. Uri? uri,
  9. Map<ModularKey, ModularRoute>? routeMap,
  10. Map<Type, Module>? innerModules,
})
override

Implementation

@override
Route copyWith({
  Handler? handler,
  String? name,
  String? schema,
  Module? module,
  List<Middleware>? middlewares,
  List<ModularRoute>? children,
  String? parent,
  Uri? uri,
  Map<ModularKey, ModularRoute>? routeMap,
  Map<Type, Module>? innerModules,
}) {
  return Route._(
    name ?? this.name,
    handler: handler ?? this.handler,
    schema: schema ?? this.schema,
    middlewares: (middlewares ?? this.middlewares),
    children: children ?? this.children,
    parent: parent ?? this.parent,
    module: module ?? this.module,
    uri: uri ?? uri,
    innerModules: innerModules ?? this.innerModules,
  );
}