copyWith method

ToggleSwitchProps copyWith({
  1. String? id,
  2. bool? value,
  3. void onChanged(
    1. bool
    )?,
  4. ArcaneInteraction? onChangeAction,
  5. bool? disabled,
  6. ComponentSize? size,
  7. ColorVariant? color,
  8. String? label,
  9. bool? labelLeft,
  10. String? group,
  11. String? itemValue,
})

Implementation

ToggleSwitchProps copyWith({
  String? id,
  bool? value,
  void Function(bool)? onChanged,
  ArcaneInteraction? onChangeAction,
  bool? disabled,
  ComponentSize? size,
  ColorVariant? color,
  String? label,
  bool? labelLeft,
  String? group,
  String? itemValue,
}) {
  return ToggleSwitchProps(
    id: id ?? this.id,
    value: value ?? this.value,
    onChanged: onChanged ?? this.onChanged,
    onChangeAction: onChangeAction ?? this.onChangeAction,
    disabled: disabled ?? this.disabled,
    size: size ?? this.size,
    color: color ?? this.color,
    label: label ?? this.label,
    labelLeft: labelLeft ?? this.labelLeft,
    group: group ?? this.group,
    itemValue: itemValue ?? this.itemValue,
  );
}