copyWith method
HMSwitchTheme
copyWith({
- Duration? duration,
- Color? color,
- HMRadius? radius,
- HMSwitchSize? size,
override
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
Implementation
@override
HMSwitchTheme copyWith({
Duration? duration,
Color? color,
HMRadius? radius,
HMSwitchSize? size,
}) {
return HMSwitchTheme(
color: color ?? this.color,
radius: radius ?? this.radius,
duration: duration ?? this.duration,
size: size ?? this.size,
);
}