copyWith method

ScreenRoute<T> copyWith({
  1. WidgetBuilder? builder,
  2. ScreenType? screenType,
  3. WrapperFn? wrapper,
  4. String? debugKey,
  5. String? deepLink,
  6. NuRouteSettings<Object?>? nuRouteSettings,
})

Creates a copy of the ScreenRoute replacing the old properties with the new provided. For the non properties provided the old will be used.

Implementation

ScreenRoute<T> copyWith({
  WidgetBuilder? builder,
  ScreenType? screenType,
  WrapperFn? wrapper,
  String? debugKey,
  String? deepLink,
  NuRouteSettings? nuRouteSettings,
}) {
  return ScreenRoute<T>(
    builder: builder ?? this.builder,
    screenType: screenType ?? this.screenType,
    wrapper: wrapper ?? this.wrapper,
    debugKey: debugKey ?? this.debugKey,
    nuRouteSettings: nuRouteSettings ?? this.nuRouteSettings,
  );
}