copyWith method

  1. @override
DrivenSwitcherThemeData copyWith({
  1. Duration? duration,
  2. Duration? reverseDuration,
  3. Curve? switchInCurve,
  4. Curve? switchOutCurve,
  5. AnimatedSwitcherTransitionBuilder? transitionBuilder,
  6. AnimatedSwitcherLayoutBuilder? layoutBuilder,
  7. bool? maintainKey,
})
override

Creates a copy of this DrivenSwitcherThemeData but with the given fields replaced with the new values.

Implementation

@override
DrivenSwitcherThemeData copyWith({
  Duration? duration,
  Duration? reverseDuration,
  Curve? switchInCurve,
  Curve? switchOutCurve,
  AnimatedSwitcherTransitionBuilder? transitionBuilder,
  AnimatedSwitcherLayoutBuilder? layoutBuilder,
  bool? maintainKey,
}) {
  return DrivenSwitcherThemeData(
    duration: duration ?? this.duration,
    reverseDuration: reverseDuration ?? this.reverseDuration,
    switchInCurve: switchInCurve ?? this.switchInCurve,
    switchOutCurve: switchOutCurve ?? this.switchOutCurve,
    transitionBuilder: transitionBuilder ?? this.transitionBuilder,
    layoutBuilder: layoutBuilder ?? this.layoutBuilder,
    maintainKey: maintainKey ?? this.maintainKey,
  );
}