copyWith method Null safety

ChipThemeData copyWith(
  1. {Color? backgroundColor,
  2. Color? deleteIconColor,
  3. Color? disabledColor,
  4. Color? selectedColor,
  5. Color? secondarySelectedColor,
  6. Color? shadowColor,
  7. Color? selectedShadowColor,
  8. Color? checkmarkColor,
  9. EdgeInsetsGeometry? labelPadding,
  10. EdgeInsetsGeometry? padding,
  11. BorderSide? side,
  12. OutlinedBorder? shape,
  13. TextStyle? labelStyle,
  14. TextStyle? secondaryLabelStyle,
  15. Brightness? brightness,
  16. double? elevation,
  17. double? pressElevation}
)

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

ChipThemeData copyWith({
  Color? backgroundColor,
  Color? deleteIconColor,
  Color? disabledColor,
  Color? selectedColor,
  Color? secondarySelectedColor,
  Color? shadowColor,
  Color? selectedShadowColor,
  Color? checkmarkColor,
  EdgeInsetsGeometry? labelPadding,
  EdgeInsetsGeometry? padding,
  BorderSide? side,
  OutlinedBorder? shape,
  TextStyle? labelStyle,
  TextStyle? secondaryLabelStyle,
  Brightness? brightness,
  double? elevation,
  double? pressElevation,
}) {
  return ChipThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    deleteIconColor: deleteIconColor ?? this.deleteIconColor,
    disabledColor: disabledColor ?? this.disabledColor,
    selectedColor: selectedColor ?? this.selectedColor,
    secondarySelectedColor: secondarySelectedColor ?? this.secondarySelectedColor,
    shadowColor: shadowColor ?? this.shadowColor,
    selectedShadowColor: selectedShadowColor ?? this.selectedShadowColor,
    checkmarkColor: checkmarkColor ?? this.checkmarkColor,
    labelPadding: labelPadding ?? this.labelPadding,
    padding: padding ?? this.padding,
    side: side ?? this.side,
    shape: shape ?? this.shape,
    labelStyle: labelStyle ?? this.labelStyle,
    secondaryLabelStyle: secondaryLabelStyle ?? this.secondaryLabelStyle,
    brightness: brightness ?? this.brightness,
    elevation: elevation ?? this.elevation,
    pressElevation: pressElevation ?? this.pressElevation,
  );
}