copyWith method
Destination<T>
copyWith({
- T? parameters,
- DestinationSettings? settings,
- Future<
Destination< upwardDestinationBuilder(DestinationParameters> ?>- Destination<
T> destination
- Destination<
Creates a copy of this destination with the given fields replaced with the new values.
Implementation
Destination<T> copyWith({
T? parameters,
DestinationSettings? settings,
Future<Destination?> Function(Destination<T> destination)?
upwardDestinationBuilder,
}) =>
this._transitBuilder == null
? Destination<T>(
path: path,
builder: builder,
isHome: isHome,
navigator: navigator,
parameters: parameters ?? this.parameters,
parser: parser,
redirections: redirections,
settings: settings ?? this.settings,
tag: tag,
upwardDestinationBuilder:
upwardDestinationBuilder ?? this.upwardDestinationBuilder,
)
: Destination<T>.transit(
path: path,
navigator: navigator,
builder: this._transitBuilder,
isHome: isHome,
redirections: redirections,
settings: settings ?? this.settings,
tag: tag,
);