copyWith method
TChip
copyWith({
- String? text,
- dynamic icon,
- Widget? trailing,
- Color? color,
- Color? background,
- Color? textColor,
- VoidCallback? onTap,
- EdgeInsets? padding,
- BorderRadius? borderRadius,
- TVariant? type,
- TSize? size,
Creates a copy of this chip with the given fields replaced with new values.
Implementation
TChip copyWith({
String? text,
dynamic icon,
Widget? trailing,
Color? color,
Color? background,
Color? textColor,
VoidCallback? onTap,
EdgeInsets? padding,
BorderRadius? borderRadius,
TVariant? type,
TSize? size,
}) {
return TChip(
key: key,
text: text ?? this.text,
icon: icon ?? this.icon,
trailing: trailing ?? this.trailing,
color: color ?? this.color,
background: background ?? this.background,
textColor: textColor ?? this.textColor,
onTap: onTap ?? this.onTap,
padding: padding ?? this.padding,
borderRadius: borderRadius ?? this.borderRadius,
type: type ?? this.type,
size: size ?? this.size,
);
}