copyWith method

CheckboxProps copyWith({
  1. bool? checked,
  2. String? label,
  3. String? description,
  4. ComponentSize? size,
  5. ColorVariant? color,
  6. bool? disabled,
  7. void onChanged(
    1. bool
    )?,
})

Implementation

CheckboxProps copyWith({
  bool? checked,
  String? label,
  String? description,
  ComponentSize? size,
  ColorVariant? color,
  bool? disabled,
  void Function(bool)? onChanged,
}) {
  return CheckboxProps(
    checked: checked ?? this.checked,
    label: label ?? this.label,
    description: description ?? this.description,
    size: size ?? this.size,
    color: color ?? this.color,
    disabled: disabled ?? this.disabled,
    onChanged: onChanged ?? this.onChanged,
  );
}