copyWith method

ConnectionTheme copyWith({
  1. ConnectionStyle? style,
  2. Color? color,
  3. Color? selectedColor,
  4. Color? highlightColor,
  5. Color? highlightBorderColor,
  6. double? strokeWidth,
  7. double? selectedStrokeWidth,
  8. List<double>? dashPattern,
  9. ConnectionEndPoint? startPoint,
  10. ConnectionEndPoint? endPoint,
  11. Color? endpointColor,
  12. Color? endpointBorderColor,
  13. double? endpointBorderWidth,
  14. ConnectionEffect? animationEffect,
  15. double? bezierCurvature,
  16. double? cornerRadius,
  17. double? portExtension,
  18. double? backEdgeGap,
  19. double? hitTolerance,
  20. double? startGap,
  21. double? endGap,
})

Creates a copy of this theme with optionally updated properties.

Any parameter that is not provided will retain its current value.

Note: Passing null for dashPattern or animationEffect will set them to null.

Implementation

ConnectionTheme copyWith({
  ConnectionStyle? style,
  Color? color,
  Color? selectedColor,
  Color? highlightColor,
  Color? highlightBorderColor,
  double? strokeWidth,
  double? selectedStrokeWidth,
  List<double>? dashPattern,
  ConnectionEndPoint? startPoint,
  ConnectionEndPoint? endPoint,
  Color? endpointColor,
  Color? endpointBorderColor,
  double? endpointBorderWidth,
  ConnectionEffect? animationEffect,
  double? bezierCurvature,
  double? cornerRadius,
  double? portExtension,
  double? backEdgeGap,
  double? hitTolerance,
  double? startGap,
  double? endGap,
}) {
  return ConnectionTheme(
    style: style ?? this.style,
    color: color ?? this.color,
    selectedColor: selectedColor ?? this.selectedColor,
    highlightColor: highlightColor ?? this.highlightColor,
    highlightBorderColor: highlightBorderColor ?? this.highlightBorderColor,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    selectedStrokeWidth: selectedStrokeWidth ?? this.selectedStrokeWidth,
    dashPattern: dashPattern,
    startPoint: startPoint ?? this.startPoint,
    endPoint: endPoint ?? this.endPoint,
    endpointColor: endpointColor ?? this.endpointColor,
    endpointBorderColor: endpointBorderColor ?? this.endpointBorderColor,
    endpointBorderWidth: endpointBorderWidth ?? this.endpointBorderWidth,
    animationEffect: animationEffect,
    bezierCurvature: bezierCurvature ?? this.bezierCurvature,
    cornerRadius: cornerRadius ?? this.cornerRadius,
    portExtension: portExtension ?? this.portExtension,
    backEdgeGap: backEdgeGap ?? this.backEdgeGap,
    hitTolerance: hitTolerance ?? this.hitTolerance,
    startGap: startGap ?? this.startGap,
    endGap: endGap ?? this.endGap,
  );
}