copyWith method

S2Choice<T> copyWith({
  1. T? value,
  2. String? title,
  3. String? subtitle,
  4. String? group,
  5. bool? disabled,
  6. bool? hidden,
  7. dynamic meta,
  8. S2ChoiceStyle? style,
  9. S2ChoiceStyle? activeStyle,
  10. ValueSetter<bool?>? select,
  11. bool? selected,
})

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

Implementation

S2Choice<T> copyWith({
  T? value,
  String? title,
  String? subtitle,
  String? group,
  bool? disabled,
  bool? hidden,
  dynamic meta,
  S2ChoiceStyle? style,
  S2ChoiceStyle? activeStyle,
  ValueSetter<bool?>? select,
  bool? selected,
}) {
  return S2Choice<T>(
    value: value ?? this.value,
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    group: group ?? this.group,
    disabled: disabled ?? this.disabled,
    hidden: hidden ?? this.hidden,
    meta: meta ?? this.meta,
    style: style ?? this.style,
    activeStyle: activeStyle ?? this.activeStyle,
    select: select ?? this.select,
    selected: selected ?? this.selected,
  );
}