copyWith method Null safety
Creates a copy of this route settings object with the given fields replaced with the new values.
Implementation
RouteSettings copyWith({
String? name,
Object? arguments,
}) {
return RouteSettings(
name: name ?? this.name,
arguments: arguments ?? this.arguments,
);
}