copyWith method

ThemeLayerInteraction copyWith({
  1. double? buttonRadius,
  2. double? strokeWidth,
  3. double? borderElementWidth,
  4. double? borderElementSpace,
  5. Color? borderColor,
  6. SystemMouseCursor? removeCursor,
  7. SystemMouseCursor? editCursor,
  8. SystemMouseCursor? rotateScaleCursor,
  9. SystemMouseCursor? hoverCursor,
  10. LayerInteractionBorderStyle? borderStyle,
  11. bool? showTooltips,
  12. Color? removeAreaBackgroundActive,
  13. Color? removeAreaBackgroundInactive,
  14. Color? buttonRemoveColor,
  15. Color? buttonRemoveBackground,
  16. Color? buttonEditTextColor,
  17. Color? buttonEditTextBackground,
  18. Color? buttonScaleRotateColor,
  19. Color? buttonScaleRotateBackground,
})

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

The copyWith method allows you to create a new instance of ThemeLayerInteraction with some properties updated while keeping the others unchanged.

Implementation

ThemeLayerInteraction copyWith({
  double? buttonRadius,
  double? strokeWidth,
  double? borderElementWidth,
  double? borderElementSpace,
  Color? borderColor,
  SystemMouseCursor? removeCursor,
  SystemMouseCursor? editCursor,
  SystemMouseCursor? rotateScaleCursor,
  SystemMouseCursor? hoverCursor,
  LayerInteractionBorderStyle? borderStyle,
  bool? showTooltips,
  Color? removeAreaBackgroundActive,
  Color? removeAreaBackgroundInactive,
  Color? buttonRemoveColor,
  Color? buttonRemoveBackground,
  Color? buttonEditTextColor,
  Color? buttonEditTextBackground,
  Color? buttonScaleRotateColor,
  Color? buttonScaleRotateBackground,
}) {
  return ThemeLayerInteraction(
    buttonRadius: buttonRadius ?? this.buttonRadius,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    borderElementWidth: borderElementWidth ?? this.borderElementWidth,
    borderElementSpace: borderElementSpace ?? this.borderElementSpace,
    borderColor: borderColor ?? this.borderColor,
    removeCursor: removeCursor ?? this.removeCursor,
    editCursor: editCursor ?? this.editCursor,
    rotateScaleCursor: rotateScaleCursor ?? this.rotateScaleCursor,
    hoverCursor: hoverCursor ?? this.hoverCursor,
    borderStyle: borderStyle ?? this.borderStyle,
    showTooltips: showTooltips ?? this.showTooltips,
    removeAreaBackgroundActive:
        removeAreaBackgroundActive ?? this.removeAreaBackgroundActive,
    removeAreaBackgroundInactive:
        removeAreaBackgroundInactive ?? this.removeAreaBackgroundInactive,
    buttonRemoveColor: buttonRemoveColor ?? this.buttonRemoveColor,
    buttonRemoveBackground:
        buttonRemoveBackground ?? this.buttonRemoveBackground,
    buttonEditTextColor: buttonEditTextColor ?? this.buttonEditTextColor,
    buttonEditTextBackground:
        buttonEditTextBackground ?? this.buttonEditTextBackground,
    buttonScaleRotateColor:
        buttonScaleRotateColor ?? this.buttonScaleRotateColor,
    buttonScaleRotateBackground:
        buttonScaleRotateBackground ?? this.buttonScaleRotateBackground,
  );
}