copyWith method

NetworkNode copyWith({
  1. String? id,
  2. String? label,
  3. String? group,
  4. double? x,
  5. double? y,
  6. double? vx,
  7. double? vy,
  8. bool? fixed,
  9. double? radius,
  10. Color? color,
  11. Map<String, dynamic>? metadata,
})

Creates a copy of this node.

Implementation

NetworkNode copyWith({
  String? id,
  String? label,
  String? group,
  double? x,
  double? y,
  double? vx,
  double? vy,
  bool? fixed,
  double? radius,
  Color? color,
  Map<String, dynamic>? metadata,
}) {
  return NetworkNode(
    id: id ?? this.id,
    label: label ?? this.label,
    group: group ?? this.group,
    x: x ?? this.x,
    y: y ?? this.y,
    vx: vx ?? this.vx,
    vy: vy ?? this.vy,
    fixed: fixed ?? this.fixed,
    radius: radius ?? this.radius,
    color: color ?? this.color,
    metadata: metadata ?? this.metadata,
  );
}