copyWith method

RouteSettings copyWith({
  1. String? name,
  2. Object? arguments,
})

Creates a copy of these settings with the given fields replaced.

Implementation

RouteSettings copyWith({String? name, Object? arguments}) {
  return RouteSettings(
    name: name ?? this.name,
    arguments: arguments ?? this.arguments,
  );
}