copyWith method

  1. @override
DrivenToggleIconStyle copyWith({
  1. double? size,
  2. Color? color,
  3. double? opacity,
  4. double? scale,
  5. Color? backColor,
  6. double? backOpacity,
  7. bool? mergeResolved,
  8. ToggleIconStyle? selectedStyle,
  9. ToggleIconStyle? disabledStyle,
})
override

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

Implementation

@override
DrivenToggleIconStyle copyWith({
  double? size,
  Color? color,
  double? opacity,
  double? scale,
  Color? backColor,
  double? backOpacity,
  bool? mergeResolved,
  ToggleIconStyle? selectedStyle,
  ToggleIconStyle? disabledStyle,
}) {
  return DrivenToggleIconStyle(
    size: size ?? this.size,
    color: color ?? this.color,
    opacity: opacity ?? this.opacity,
    scale: scale ?? this.scale,
    backColor: backColor ?? this.backColor,
    backOpacity: backOpacity ?? this.backOpacity,
    mergeResolved: mergeResolved ?? this.mergeResolved,
    selectedStyle: this.selectedStyle?.merge(selectedStyle) ?? selectedStyle,
    disabledStyle: this.disabledStyle?.merge(disabledStyle) ?? disabledStyle,
  );
}