GzBaseNode constructor

GzBaseNode({
  1. required String id,
  2. required List<GzBaseNode> children,
  3. String? label,
  4. String? color,
  5. String? fontColor,
  6. String? shape,
})

label is optional. If null, will become id. Side effect: GzBaseNode.globalKeys is increased by one.

Implementation

GzBaseNode({
  required this.id,
  required this.children,
  String? label,
  this.color,
  this.fontColor,
  this.shape,
}) : label = label ?? id {
  key = globalKeys++;
}