copyWith method
ConnectionTheme
copyWith({
- ConnectionStyle? style,
- Color? color,
- Color? selectedColor,
- double? strokeWidth,
- double? selectedStrokeWidth,
- List<
double> ? dashPattern, - ConnectionEndPoint? startPoint,
- ConnectionEndPoint? endPoint,
- ConnectionEffect? animationEffect,
- double? bezierCurvature,
- double? cornerRadius,
- double? portExtension,
- double? hitTolerance,
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,
double? strokeWidth,
double? selectedStrokeWidth,
List<double>? dashPattern,
ConnectionEndPoint? startPoint,
ConnectionEndPoint? endPoint,
ConnectionEffect? animationEffect,
double? bezierCurvature,
double? cornerRadius,
double? portExtension,
double? hitTolerance,
}) {
return ConnectionTheme(
style: style ?? this.style,
color: color ?? this.color,
selectedColor: selectedColor ?? this.selectedColor,
strokeWidth: strokeWidth ?? this.strokeWidth,
selectedStrokeWidth: selectedStrokeWidth ?? this.selectedStrokeWidth,
dashPattern: dashPattern,
startPoint: startPoint ?? this.startPoint,
endPoint: endPoint ?? this.endPoint,
animationEffect: animationEffect,
bezierCurvature: bezierCurvature ?? this.bezierCurvature,
cornerRadius: cornerRadius ?? this.cornerRadius,
portExtension: portExtension ?? this.portExtension,
hitTolerance: hitTolerance ?? this.hitTolerance,
);
}