copyWith method

  1. @override
SwitchTileThemeData copyWith({
  1. Curve? curve,
  2. Duration? duration,
  3. ControlAffinity? controlAffinity,
  4. SwitchStyle? switchStyle,
  5. ButtonStyle? buttonStyle,
})
override

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

Implementation

@override
SwitchTileThemeData copyWith({
  Curve? curve,
  Duration? duration,
  ControlAffinity? controlAffinity,
  SwitchStyle? switchStyle,
  ButtonStyle? buttonStyle,
}) {
  return SwitchTileThemeData(
    curve: curve ?? this.curve,
    duration: duration ?? this.duration,
    controlAffinity: controlAffinity ?? this.controlAffinity,
    switchStyle: this.switchStyle.merge(switchStyle),
    buttonStyle: this.buttonStyle.merge(buttonStyle),
  );
}