merge method

C2Choice<T> merge(
  1. C2Choice<T>? other
)

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

Implementation

C2Choice<T> merge(C2Choice<T>? other) {
  // if null return current object
  if (other == null) return this;

  return copyWith(
    value: other.value,
    label: other.label,
    avatarImage: other.avatarImage,
    avatarText: other.avatarText,
    tooltip: other.tooltip,
    disabled: other.disabled,
    hidden: other.hidden,
    meta: other.meta,
    style: other.style,
    delete: other.delete,
    select: other.select,
    selected: other.selected,
  );
}