copyWith method
Create a copy with different initial values (for migration purposes) This creates a new config instance with the specified values
Implementation
NodeFlowConfig copyWith({
bool? snapToGrid,
bool? snapAnnotationsToGrid,
double? gridSize,
double? portSnapDistance,
double? minZoom,
double? maxZoom,
bool? showMinimap,
bool? isMinimapInteractive,
CornerPosition? minimapPosition,
Size? minimapSize,
bool? showAttribution,
}) {
return NodeFlowConfig(
snapToGrid: snapToGrid ?? this.snapToGrid.value,
snapAnnotationsToGrid:
snapAnnotationsToGrid ?? this.snapAnnotationsToGrid.value,
gridSize: gridSize ?? this.gridSize.value,
portSnapDistance: portSnapDistance ?? this.portSnapDistance.value,
minZoom: minZoom ?? this.minZoom.value,
maxZoom: maxZoom ?? this.maxZoom.value,
showMinimap: showMinimap ?? this.showMinimap.value,
isMinimapInteractive:
isMinimapInteractive ?? this.isMinimapInteractive.value,
minimapPosition: minimapPosition ?? this.minimapPosition.value,
minimapSize: minimapSize ?? this.minimapSize.value,
showAttribution: showAttribution ?? this.showAttribution,
);
}