copyWith method
If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.
A new instance of ZeroSwitchStyle with the same properties as the original instance, except for the properties that are explicitly overridden.
Implementation
ZeroSwitchStyle copyWith({
Color? activeColor,
Color? inactiveColor,
Color? activeThumbColor,
Color? inactiveThumbColor,
double? thumbSize,
}) {
return ZeroSwitchStyle(
activeColor: activeColor ?? this.activeColor,
inactiveColor: inactiveColor ?? this.inactiveColor,
activeThumbColor: activeThumbColor ?? this.activeThumbColor,
inactiveThumbColor: inactiveThumbColor ?? this.inactiveThumbColor,
thumbSize: thumbSize ?? this.thumbSize,
);
}