add method

void add (
  1. DartdocOption<Object> option
)

Adds a DartdocOption to the children of this DartdocOption.

Implementation

void add(DartdocOption<Object> option) {
  if (_children.containsKey(option.name)) {
    throw DartdocOptionError(
        'Tried to add two children with the same name: ${option.name}');
  }
  _children[option.name] = option;
  option.parent = this;
  option.traverse((option) => option._onAdd());
}