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