copyWith method
PageRouteInfo
copyWith({
- String? name,
- String? path,
- SearchReferralReconciliationsRouteArgs? args,
- RouteMatch? match,
- Map<
String, dynamic> ? params, - Map<
String, dynamic> ? queryParams, - List<
PageRouteInfo> ? children, - String? fragment,
inherited
Returns a new instance with the provided overrides
Implementation
PageRouteInfo copyWith({
String? name,
String? path,
T? args,
RouteMatch? match,
Map<String, dynamic>? params,
Map<String, dynamic>? queryParams,
List<PageRouteInfo>? children,
String? fragment,
}) {
if ((name == null || identical(name, _name)) &&
(fragment == null || identical(fragment, this.fragment)) &&
(args == null || identical(args, this.args)) &&
(params == null || identical(params, rawPathParams)) &&
(queryParams == null || identical(queryParams, rawQueryParams)) &&
(children == null || identical(children, initialChildren))) {
return this;
}
return PageRouteInfo(
name ?? _name,
args: args ?? this.args,
rawPathParams: params ?? rawPathParams,
rawQueryParams: queryParams ?? rawQueryParams,
initialChildren: children ?? initialChildren,
);
}