copyWith method
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,
})
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,
);
}