copyWith method

C2Choice<T> copyWith({
  1. T? value,
  2. String? label,
  3. ImageProvider<Object>? avatarImage,
  4. Widget? avatarText,
  5. String? tooltip,
  6. bool? disabled,
  7. bool? hidden,
  8. dynamic meta,
  9. C2ChipStyle? style,
  10. VoidCallback? delete,
  11. dynamic select(
    1. bool selected
    )?,
  12. bool? selected,
})

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

Implementation

C2Choice<T> copyWith({
  T? value,
  String? label,
  ImageProvider? avatarImage,
  Widget? avatarText,
  String? tooltip,
  bool? disabled,
  bool? hidden,
  dynamic meta,
  C2ChipStyle? style,
  VoidCallback? delete,
  Function(bool selected)? select,
  bool? selected,
}) {
  return C2Choice<T>(
    value: value ?? this.value,
    label: label ?? this.label,
    avatarImage: avatarImage ?? this.avatarImage,
    avatarText: avatarText ?? this.avatarText,
    tooltip: tooltip ?? this.tooltip,
    disabled: disabled ?? this.disabled,
    hidden: hidden ?? this.hidden,
    meta: meta ?? this.meta,
    style: style ?? this.style,
    delete: delete ?? this.delete,
    select: select ?? this.select,
    selected: selected ?? this.selected,
  );
}