copyWith method

  1. @override
HMSwitchTheme copyWith({
  1. Duration? duration,
  2. Color? color,
  3. HMRadius? radius,
  4. 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,
  );
}