copyWith method
C2Choice<T>
copyWith({
- T? value,
- String? label,
- ImageProvider<
Object> ? avatarImage, - Widget? avatarText,
- String? tooltip,
- bool? disabled,
- dynamic meta,
- C2ChipStyle? style,
- VoidCallback? delete,
- dynamic select(
- bool selected
- 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,
);
}