copyWith method
S2Choice<T>
copyWith({
- T? value,
- String? title,
- String? subtitle,
- String? group,
- bool? disabled,
- dynamic meta,
- S2ChoiceStyle? style,
- S2ChoiceStyle? activeStyle,
- ValueSetter<
bool?> ? select, - 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,
);
}