copyWith method

PageRouteInfo copyWith({
  1. String? name,
  2. String? path,
  3. RecordStockWrapperRouteArgs? args,
  4. RouteMatch? match,
  5. Map<String, dynamic>? params,
  6. Map<String, dynamic>? queryParams,
  7. List<PageRouteInfo>? children,
  8. 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,
  );
}