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