copyWith method

PillStyle copyWith({
  1. Color? backgroundColor,
  2. Color? borderColor,
  3. Color? labelColor,
  4. Color? valueColor,
  5. Color? dividerColor,
  6. double? borderWidth,
  7. double? borderRadius,
  8. FontWeight? labelFontWeight,
  9. FontWeight? valueFontWeight,
  10. double? fontSize,
  11. Color? selectedBackgroundColor,
  12. Color? selectedBorderColor,
  13. 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,
  );
}