copyWith method

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

Implementation

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