copyWith method

ElkPort copyWith({
  1. String? id,
  2. HwMeta? hwMeta,
  3. String? direction,
  4. String? side,
  5. int? index,
  6. List<ElkPort>? children,
  7. double? x,
  8. double? y,
  9. double? width,
  10. double? height,
})

Create a copy with updated fields.

Implementation

ElkPort copyWith({
  String? id,
  HwMeta? hwMeta,
  String? direction,
  String? side,
  int? index,
  List<ElkPort>? children,
  double? x,
  double? y,
  double? width,
  double? height,
}) =>
    ElkPort(
      id: id ?? this.id,
      hwMeta: hwMeta ?? this.hwMeta,
      direction: direction ?? this.direction,
      side: side ?? this.side,
      index: index ?? this.index,
      children: children ?? this.children,
      x: x ?? this.x,
      y: y ?? this.y,
      width: width ?? this.width,
      height: height ?? this.height,
    );