copyWith method

RouteArgs copyWith({
  1. RouteInfo? route,
  2. String? id,
  3. Map<String, String>? pathParams,
  4. Map<String, String>? queryParams,
  5. Object? object,
  6. RouteArgs? resumeTo,
  7. RouteArgs? comingFrom,
  8. bool? isFromDeeplink,
  9. bool? pushGlobally,
  10. DuplicateRouteBehavior? duplicateBehavior,
  11. bool? isIdSlug,
  12. bool? mustBeAuthorized,
  13. RoutePolicy? policy,
})

Create a copy with overridden fields.

Implementation

RouteArgs copyWith({
  RouteInfo? route,
  String? id,
  Map<String, String>? pathParams,
  Map<String, String>? queryParams,
  Object? object,
  RouteArgs? resumeTo,
  RouteArgs? comingFrom,
  bool? isFromDeeplink,
  bool? pushGlobally,
  DuplicateRouteBehavior? duplicateBehavior,
  bool? isIdSlug,
  bool? mustBeAuthorized,
  RoutePolicy? policy,
}) => RouteArgs(
  route ?? this.route,
  id: id ?? this.id,
  pathParams: pathParams ?? this.pathParams,
  queryParams: queryParams ?? this.queryParams,
  object: object ?? this.object,
  resumeTo: resumeTo ?? this.resumeTo,
  comingFrom: comingFrom ?? this.comingFrom,
  isFromDeeplink: isFromDeeplink ?? this.isFromDeeplink,
  pushGlobally: pushGlobally ?? this.pushGlobally,
  duplicateBehavior: duplicateBehavior ?? this.duplicateBehavior,
  isIdSlug: isIdSlug ?? this.isIdSlug,
  mustBeAuthorized: mustBeAuthorized ?? this.mustBeAuthorized,
  policy: policy ?? this.policy,
);