copyWith method
SwitchTileThemeData
copyWith({
- Curve? curve,
- Duration? duration,
- ControlAffinity? controlAffinity,
- SwitchStyle? switchStyle,
- 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),
);
}