copyWith method

BeamParameters copyWith({
  1. TransitionDelegate? transitionDelegate,
  2. RouteInformation? popConfiguration,
  3. bool resetPopConfiguration = false,
  4. bool? beamBackOnPop,
  5. bool? popBeamLocationOnPop,
  6. bool? stacked,
})

Returns a copy of this with optional changes.

Implementation

BeamParameters copyWith({
  TransitionDelegate? transitionDelegate,
  RouteInformation? popConfiguration,
  bool resetPopConfiguration = false,
  bool? beamBackOnPop,
  bool? popBeamLocationOnPop,
  bool? stacked,
}) {
  return BeamParameters(
    transitionDelegate: transitionDelegate ?? this.transitionDelegate,
    popConfiguration: resetPopConfiguration
        ? null
        : popConfiguration ?? this.popConfiguration,
    beamBackOnPop: beamBackOnPop ?? this.beamBackOnPop,
    popBeamLocationOnPop: popBeamLocationOnPop ?? this.popBeamLocationOnPop,
    stacked: stacked ?? this.stacked,
  );
}