copyWith method

NetworkLink copyWith({
  1. String? source,
  2. String? target,
  3. double? weight,
  4. String? label,
  5. Color? color,
  6. double? width,
  7. bool? directed,
  8. Map<String, dynamic>? metadata,
})

Creates a copy of this link.

Implementation

NetworkLink copyWith({
  String? source,
  String? target,
  double? weight,
  String? label,
  Color? color,
  double? width,
  bool? directed,
  Map<String, dynamic>? metadata,
}) {
  return NetworkLink(
    source: source ?? this.source,
    target: target ?? this.target,
    weight: weight ?? this.weight,
    label: label ?? this.label,
    color: color ?? this.color,
    width: width ?? this.width,
    directed: directed ?? this.directed,
    metadata: metadata ?? this.metadata,
  );
}