copyWith method
PillStyle
copyWith({
- Color? backgroundColor,
- Color? borderColor,
- Color? labelColor,
- Color? valueColor,
- Color? dividerColor,
- double? borderWidth,
- double? borderRadius,
- FontWeight? labelFontWeight,
- FontWeight? valueFontWeight,
- double? fontSize,
- Color? selectedBackgroundColor,
- Color? selectedBorderColor,
- double? selectedBorderWidth,
Creates a copy of this PillStyle with the given fields replaced.
Implementation
PillStyle copyWith({
Color? backgroundColor,
Color? borderColor,
Color? labelColor,
Color? valueColor,
Color? dividerColor,
double? borderWidth,
double? borderRadius,
FontWeight? labelFontWeight,
FontWeight? valueFontWeight,
double? fontSize,
Color? selectedBackgroundColor,
Color? selectedBorderColor,
double? selectedBorderWidth,
}) {
return PillStyle(
backgroundColor: backgroundColor ?? this.backgroundColor,
borderColor: borderColor ?? this.borderColor,
labelColor: labelColor ?? this.labelColor,
valueColor: valueColor ?? this.valueColor,
dividerColor: dividerColor ?? this.dividerColor,
borderWidth: borderWidth ?? this.borderWidth,
borderRadius: borderRadius ?? this.borderRadius,
labelFontWeight: labelFontWeight ?? this.labelFontWeight,
valueFontWeight: valueFontWeight ?? this.valueFontWeight,
fontSize: fontSize ?? this.fontSize,
selectedBackgroundColor:
selectedBackgroundColor ?? this.selectedBackgroundColor,
selectedBorderColor: selectedBorderColor ?? this.selectedBorderColor,
selectedBorderWidth: selectedBorderWidth ?? this.selectedBorderWidth,
);
}