copyWith method

NodeFlowConfig copyWith({
  1. bool? snapToGrid,
  2. bool? snapAnnotationsToGrid,
  3. double? gridSize,
  4. double? portSnapDistance,
  5. double? minZoom,
  6. double? maxZoom,
  7. bool? showMinimap,
  8. bool? isMinimapInteractive,
  9. CornerPosition? minimapPosition,
  10. Size? minimapSize,
  11. bool? showAttribution,
})

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,
  );
}