addChild method Null safety

dynamic addChild(
  1. NodeData child
)

Implementation

addChild(NodeData child) {
  children.add(child);
}