LayoutNode constructor

LayoutNode({
  1. required HierarchyOccurrence occurrence,
  2. String? id,
  3. HwMeta? hwMeta,
  4. Map<String, dynamic>? properties,
  5. List<ElkPort>? elkPorts,
  6. List<LayoutNode>? children,
  7. List<LayoutNode>? hiddenChildren,
  8. List<LayoutHyperedge>? hyperedges,
  9. LayoutNode? parent,
  10. double? x,
  11. double? y,
  12. double? width,
  13. double? height,
  14. ElkPadding? padding,
  15. String? hierarchyNodeId,
  16. Set<String>? partialChildIds,
  17. Set<String>? partialHyperedgeIds,
})

Constructor for LayoutNode.

Implementation

LayoutNode({
  required this.occurrence,
  String? id,
  HwMeta? hwMeta,
  Map<String, dynamic>? properties,
  List<ElkPort>? elkPorts,
  List<LayoutNode>? children,
  this.hiddenChildren,
  this.hyperedges,
  this.parent,
  this.x,
  this.y,
  this.width,
  this.height,
  this.padding,
  this.hierarchyNodeId,
  this.partialChildIds,
  this.partialHyperedgeIds,
})  : _id = id,
      hwMeta = hwMeta ?? HwMeta(name: occurrence.name),
      properties = properties ??
          {
            'org.eclipse.elk.portConstraints': 'FIXED_ORDER',
            'org.eclipse.elk.layered.mergeEdges': 1,
          },
      elkPorts = elkPorts ?? [],
      children = children ?? [];