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? surfaceTintColor,
  8. Color? selectedShadowColor,
  9. bool? showCheckmark,
  10. Color? checkmarkColor,
  11. EdgeInsetsGeometry? labelPadding,
  12. EdgeInsetsGeometry? padding,
  13. BorderSide? side,
  14. OutlinedBorder? shape,
  15. TextStyle? labelStyle,
  16. TextStyle? secondaryLabelStyle,
  17. Brightness? brightness,
  18. double? elevation,
  19. double? pressElevation,
  20. IconThemeData? iconTheme}
)

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? surfaceTintColor,
  Color? selectedShadowColor,
  bool? showCheckmark,
  Color? checkmarkColor,
  EdgeInsetsGeometry? labelPadding,
  EdgeInsetsGeometry? padding,
  BorderSide? side,
  OutlinedBorder? shape,
  TextStyle? labelStyle,
  TextStyle? secondaryLabelStyle,
  Brightness? brightness,
  double? elevation,
  double? pressElevation,
  IconThemeData? iconTheme,
}) {
  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,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    selectedShadowColor: selectedShadowColor ?? this.selectedShadowColor,
    showCheckmark: showCheckmark ?? this.showCheckmark,
    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,
    iconTheme: iconTheme ?? this.iconTheme,
  );
}