copy method
EdgeConnectionsModel
copy({
- NodeSocketModel? source,
- NodeSocketModel? target,
- dynamic data,
- LukeEdgePainter? painter,
- double? animationSpeed,
- bool? isAnimated,
Returns a new copy with updated source and/or target sockets.
Implementation
EdgeConnectionsModel copy({
NodeSocketModel? source,
NodeSocketModel? target,
dynamic data,
LukeEdgePainter? painter,
double? animationSpeed,
bool? isAnimated,
}) {
final newSource = source ?? this.source.copy();
final newTarget = target ?? this.target.copy();
return EdgeConnectionsModel(
source: newSource,
target: newTarget,
data: data ?? this.data,
painter: painter ?? this.painter,
animationSpeed: animationSpeed ?? this.animationSpeed,
isAnimated: isAnimated ?? this.isAnimated,
);
}